summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/ext/shell_escape.py4
-rw-r--r--ranger/fsobject/fsobject.py4
-rw-r--r--ranger/gui/widgets/console.py8
-rw-r--r--ranger/runner.py1
4 files changed, 8 insertions, 9 deletions
diff --git a/ranger/ext/shell_escape.py b/ranger/ext/shell_escape.py
index 682cd86f..01304033 100644
--- a/ranger/ext/shell_escape.py
+++ b/ranger/ext/shell_escape.py
@@ -20,12 +20,12 @@ META_CHARS = (' ', "'", '"', '`', '&', '|', ';',
 		'$', '!', '(', ')', '[', ']', '<', '>')
 META_DICT = dict([(mc, '\\' + mc) for mc in META_CHARS])
 
-def shell_escape(string):
+def shell_quote(string):
 	"""Escapes by quoting"""
 	return "'" + str(string).replace("'", "'\\''") + "'"
 
 
-def shell_escape2(arg):
+def shell_escape(arg):
 	"""Escapes by adding backslashes"""
 	arg = str(arg)
 	arg = arg.replace('\\', '\\\\') # make sure this comes at the start
diff --git a/ranger/fsobject/fsobject.py b/ranger/fsobject/fsobject.py
index 4b734e8a..76e9bd3c 100644
--- a/ranger/fsobject/fsobject.py
+++ b/ranger/fsobject/fsobject.py
@@ -18,7 +18,7 @@ DOCUMENT_BASENAMES = 'README TODO LICENSE COPYING INSTALL'.split()
 
 from . import T_FILE, T_DIRECTORY, T_UNKNOWN, T_NONEXISTANT, BAD_INFO
 from ranger.shared import MimeTypeAware, FileManagerAware
-from ranger.ext.shell_escape import shell_escape2
+from ranger.ext.shell_escape import shell_escape
 
 class FileSystemObject(MimeTypeAware, FileManagerAware):
 	is_file = False
@@ -82,7 +82,7 @@ class FileSystemObject(MimeTypeAware, FileManagerAware):
 	@property
 	def shell_escaped_basename(self):
 		if self._shell_escaped_basename is None:
-			self._shell_escaped_basename = shell_escape2(self.basename)
+			self._shell_escaped_basename = shell_escape(self.basename)
 		return self._shell_escaped_basename
 
 	def get_description(self):
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index 34c8abf5..a5fd30a2 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -25,7 +25,7 @@ from . import Widget
 from ranger import commands
 from ranger.gui.widgets.console_mode import is_valid_mode, mode_to_class
 from ranger import log
-from ranger.ext.shell_escape import shell_escape
+from ranger.ext.shell_escape import shell_quote
 
 DEFAULT_HISTORY = 0
 SEARCH_HISTORY = 1
@@ -421,11 +421,11 @@ class OpenConsole(ConsoleWithTab):
 		dct = {}
 
 		if self.fm.env.cf:
-			dct['f'] = shell_escape(self.fm.env.cf.basename)
+			dct['f'] = shell_quote(self.fm.env.cf.basename)
 		else:
 			dct['f'] = ''
 
-		dct['s'] = ' '.join(shell_escape(fl.basename) \
+		dct['s'] = ' '.join(shell_quote(fl.basename) \
 				for fl in self.fm.env.get_selection())
 
 		return _CustomTemplate(command).safe_substitute(dct)
@@ -445,7 +445,7 @@ class OpenConsole(ConsoleWithTab):
 			add_selection = True
 
 		if add_selection:
-			cmd += ' ' + ' '.join(shell_escape(fl.basename) \
+			cmd += ' ' + ' '.join(shell_quote(fl.basename) \
 					for fl in self.env.get_selection())
 
 		return (cmd, flags)
diff --git a/ranger/runner.py b/ranger/runner.py
index c61c11a5..25c0fb3b 100644
--- a/ranger/runner.py
+++ b/ranger/runner.py
@@ -33,7 +33,6 @@ p: redirect output to the pager
 import os
 import sys
 from subprocess import Popen, PIPE
-from ranger.ext.shell_escape import shell_escape
 from ranger.ext.waitpid_no_intr import waitpid_no_intr
 
 
> 2010-03-21 03:52:58 +0100 committer hut <hut@lavabit.com> 2010-03-21 03:52:58 +0100 updated TODO and pydoc' href='/akspecs/ranger/commit/doc/pydoc/ranger.defaults.options.html?h=v1.1.1&id=c776804d9db1f0ae837aaafe8ed27eb47bb369f5'>c776804d ^
34a60763 ^
c776804d ^
c9383c72 ^
f07bb12f ^
c9383c72 ^
c776804d ^
34a60763 ^
a614f048 ^
ef0157ff ^
c776804d ^
34a60763 ^
f07bb12f ^
c9383c72 ^
34a60763 ^
a614f048 ^


c9383c72 ^


f07bb12f ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77