diff options
author | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2015-02-18 11:23:15 +0100 |
---|---|---|
committer | Wojciech Siewierski <wojciech.siewierski@onet.pl> | 2015-02-18 11:25:32 +0100 |
commit | 64cac6291029dd7b1795066ab17393714e9fd045 (patch) | |
tree | 890533bfc740ff0e95760d739b88357e8c3ef415 /ranger | |
parent | a949de1706994396bfe763f2bce0979b48dfa94d (diff) | |
download | ranger-64cac6291029dd7b1795066ab17393714e9fd045.tar.gz |
core.actions: the file macros work properly with :flat
%s, %f and %t in particular.
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 1167dab5..08e0420b 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -258,12 +258,12 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): macros['rangerdir'] = ranger.RANGERDIR if self.fm.thisfile: - macros['f'] = self.fm.thisfile.basename + macros['f'] = self.fm.thisfile.relative_path else: macros['f'] = MACRO_FAIL if self.fm.thistab.get_selection: - macros['s'] = [fl.basename for fl in self.fm.thistab.get_selection()] + macros['s'] = [fl.relative_path for fl in self.fm.thistab.get_selection()] else: macros['s'] = MACRO_FAIL @@ -273,7 +273,7 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): macros['c'] = MACRO_FAIL if self.fm.thisdir.files: - macros['t'] = [fl.basename for fl in self.fm.thisdir.files + macros['t'] = [fl.relative_path for fl in self.fm.thisdir.files if fl.realpath in (self.fm.tags or [])] else: macros['t'] = MACRO_FAIL |