summary refs log tree commit diff stats
path: root/examples
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech.siewierski@onet.pl>2015-05-08 10:16:10 +0200
committerWojciech Siewierski <wojciech.siewierski@onet.pl>2015-05-08 10:16:10 +0200
commitdff0e71b2aa0c4f74816db0ffdd0c662836652cf (patch)
treecb066f4ecab178c91f202b893ed2a36e9848b5d3 /examples
parentfa7cb5b8145d005286312ca69da9d254683b5ea7 (diff)
downloadranger-dff0e71b2aa0c4f74816db0ffdd0c662836652cf.tar.gz
Replaced file.basename with file.relative_path where appropriate.
The usage of file.basename could lead to some issues with :flat.
Diffstat (limited to 'examples')
-rw-r--r--examples/plugin_linemode.py2
-rw-r--r--examples/rc_emacs.conf4
2 files changed, 3 insertions, 3 deletions
diff --git a/examples/plugin_linemode.py b/examples/plugin_linemode.py
index e4513f5d..8a92552e 100644
--- a/examples/plugin_linemode.py
+++ b/examples/plugin_linemode.py
@@ -13,4 +13,4 @@ from ranger.core.linemode import LinemodeBase
 class MyLinemode(LinemodeBase):
     name = "rot13"
     def filetitle(self, file, metadata):
-        return codecs.encode(file.basename, "rot_13")
+        return codecs.encode(file.relative_path, "rot_13")
diff --git a/examples/rc_emacs.conf b/examples/rc_emacs.conf
index aab083f4..e8b76ff2 100644
--- a/examples/rc_emacs.conf
+++ b/examples/rc_emacs.conf
@@ -318,8 +318,8 @@ map <C-x>wn shell -f echo -n %f    | xsel -i; xsel -o | xsel -i -b
 map <C-x>= chmod
 
 map <A-d>  console rename%space
-map <C-e>  eval fm.open_console('rename ' + fm.thisfile.basename)
-map <C-a>  eval fm.open_console('rename ' + fm.thisfile.basename, position=7)
+map <C-e>  eval fm.open_console('rename ' + fm.thisfile.relative_path)
+map <C-a>  eval fm.open_console('rename ' + fm.thisfile.relative_path, position=7)
 
 map <C-y>y  paste
 map <C-y>o  paste overwrite=True