diff options
author | hut <hut@lepus.uberspace.de> | 2015-11-14 03:44:10 +0100 |
---|---|---|
committer | hut <hut@lepus.uberspace.de> | 2015-11-14 03:44:10 +0100 |
commit | d11e47ee5065306d3e837ddfb44382acdebe5160 (patch) | |
tree | 8e88f0edbae5377df128e79ec930087b4a059027 /ranger | |
parent | 88c1fd2f5c6aec91eb4e13dee1c4b1b703b3d886 (diff) | |
parent | a090d85eae9f6016b655943c97a2bbf8416c12ce (diff) | |
download | ranger-d11e47ee5065306d3e837ddfb44382acdebe5160.tar.gz |
Merge branch 'p_macro' of https://github.com/NoSuck/ranger
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/core/actions.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py index 26dcf4f7..7007581d 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -253,8 +253,10 @@ class Actions(FileManagerAware, SettingsAware): macros['f'] = MACRO_FAIL if self.fm.thistab.get_selection: + macros['p'] = [os.path.join(self.fm.thisdir.path, fl.relative_path) for fl in self.fm.thistab.get_selection()] macros['s'] = [fl.relative_path for fl in self.fm.thistab.get_selection()] else: + macros['p'] = MACRO_FAIL macros['s'] = MACRO_FAIL if self.fm.copy_buffer: @@ -273,7 +275,7 @@ class Actions(FileManagerAware, SettingsAware): else: macros['d'] = '.' - # define d/f/s macros for each tab + # define d/f/p/s macros for each tab for i in range(1,10): try: tab = self.fm.tabs[i] @@ -285,15 +287,17 @@ class Actions(FileManagerAware, SettingsAware): i = str(i) macros[i + 'd'] = tabdir.path if tabdir.get_selection(): + macros[i + 'p'] = [os.path.join(tabdir.path, fl.relative_path) for fl in tabdir.get_selection()] macros[i + 's'] = [fl.path for fl in tabdir.get_selection()] else: + macros[i + 'p'] = MACRO_FAIL macros[i + 's'] = MACRO_FAIL if tabdir.pointed_obj: macros[i + 'f'] = tabdir.pointed_obj.path else: macros[i + 'f'] = MACRO_FAIL - # define D/F/S for the next tab + # define D/F/P/S for the next tab found_current_tab = False next_tab = None first_tab = None @@ -316,8 +320,10 @@ class Actions(FileManagerAware, SettingsAware): else: macros['F'] = MACRO_FAIL if next_tab_dir.get_selection(): + macros['P'] = [os.path.join(next_tab.path, fl.path) for fl in next_tab.get_selection()] macros['S'] = [fl.path for fl in next_tab.get_selection()] else: + macros['P'] = MACRO_FAIL macros['S'] = MACRO_FAIL else: macros['D'] = MACRO_FAIL |