From dff0e71b2aa0c4f74816db0ffdd0c662836652cf Mon Sep 17 00:00:00 2001 From: Wojciech Siewierski Date: Fri, 8 May 2015 10:16:10 +0200 Subject: Replaced file.basename with file.relative_path where appropriate. The usage of file.basename could lead to some issues with :flat. --- examples/plugin_linemode.py | 2 +- examples/rc_emacs.conf | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'examples') 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 wn shell -f echo -n %f | xsel -i; xsel -o | xsel -i -b map = chmod map console rename%space -map eval fm.open_console('rename ' + fm.thisfile.basename) -map eval fm.open_console('rename ' + fm.thisfile.basename, position=7) +map eval fm.open_console('rename ' + fm.thisfile.relative_path) +map eval fm.open_console('rename ' + fm.thisfile.relative_path, position=7) map y paste map o paste overwrite=True -- cgit 1.4.1-2-gfad0