summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/config/commands.py4
-rw-r--r--ranger/config/rc.conf4
2 files changed, 4 insertions, 4 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 13b6a50c..a834278d 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -778,9 +778,9 @@ class rename_append(Command):
     def execute(self):
         cf = self.fm.thisfile
         if cf.relative_path.find('.') != 0 and cf.relative_path.rfind('.') != -1 and not cf.is_directory:
-            self.fm.open_console('rename ' + cf.relative_path, position=(7 + cf.relative_path.rfind('.')))
+            self.fm.open_console('rename ' + cf.relative_path.replace("%", "%%"), position=(7 + cf.relative_path.rfind('.')))
         else:
-            self.fm.open_console('rename ' + cf.relative_path)
+            self.fm.open_console('rename ' + cf.relative_path.replace("%", "%%"))
 
 class chmod(Command):
     """:chmod <octal number>
diff --git a/ranger/config/rc.conf b/ranger/config/rc.conf
index b2965cdc..d1bad101 100644
--- a/ranger/config/rc.conf
+++ b/ranger/config/rc.conf
@@ -339,8 +339,8 @@ map =  chmod
 
 map cw console rename%space
 map a  rename_append
-map A  eval fm.open_console('rename ' + fm.thisfile.relative_path)
-map I  eval fm.open_console('rename ' + fm.thisfile.relative_path, position=7)
+map A  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"))
+map I  eval fm.open_console('rename ' + fm.thisfile.relative_path.replace("%", "%%"), position=7)
 
 map pp paste
 map po paste overwrite=True
id='n1' href='#n1'>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