summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2013-02-25 04:03:24 +0100
committerhut <hut@lavabit.com>2013-02-25 04:03:24 +0100
commitda21d3d56862b34f3b15b08f9c7036e61649e055 (patch)
tree2afd4ce88fc4f5cd963596cf43651f455ac5c0b5 /ranger
parent5f64bc20d49dec42dfc55085eaa4c634071fbc54 (diff)
downloadranger-da21d3d56862b34f3b15b08f9c7036e61649e055.tar.gz
api.commands: fix quick/tab/cancel for aliased commands
Diffstat (limited to 'ranger')
-rw-r--r--ranger/api/commands.py15
1 files changed, 14 insertions, 1 deletions
diff --git a/ranger/api/commands.py b/ranger/api/commands.py
index f66be7ee..06bbdb57 100644
--- a/ranger/api/commands.py
+++ b/ranger/api/commands.py
@@ -374,7 +374,20 @@ class AliasCommand(Command):
     _function_name = "unknown"
     _line = ""
     def execute(self):
-        self.fm.execute_console(self._line + ' ' + self.rest(1))
+        return self._make_cmd().execute()
+
+    def quick(self):
+        return self._make_cmd().quick()
+
+    def tab(self):
+        return self._make_cmd().tab()
+
+    def cancel(self):
+        return self._make_cmd().cancel()
+
+    def _make_cmd(self):
+        Cmd = self.fm.commands.get_command(self._line.split()[0])
+        return Cmd(self._line + ' ' + self.rest(1))
 
 
 if __name__ == '__main__':