about summary refs log tree commit diff stats
path: root/ranger/api/commands.py
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2014-12-10 01:56:13 +0100
committerhut <hut@lepus.uberspace.de>2014-12-10 02:01:07 +0100
commitd0414ecd2dde3a154e8ef71188de574916a92a1c (patch)
tree29a5716d0f65980c942591ddf0ca885902a9eee4 /ranger/api/commands.py
parent2cd8bc7768ab3bdb95a2bdf49565db96d75659c1 (diff)
downloadranger-d0414ecd2dde3a154e8ef71188de574916a92a1c.tar.gz
api.commands: Added attribute Command.quickly_executed
This is set to True if the command was executed by cmd.quick() returning
True on a line change.
Diffstat (limited to 'ranger/api/commands.py')
-rw-r--r--ranger/api/commands.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/api/commands.py b/ranger/api/commands.py
index 7f5fcf36..e00fe385 100644
--- a/ranger/api/commands.py
+++ b/ranger/api/commands.py
@@ -92,6 +92,7 @@ class Command(FileManagerAware):
         self.line = line
         self.args = line.split()
         self.quantifier = quantifier
+        self.quickly_executed = False
         try:
             self.firstpart = line[:line.rindex(' ') + 1]
         except ValueError:
@@ -407,6 +408,7 @@ class AliasCommand(Command):
     def _make_cmd(self):
         cmd_class = self.fm.commands.get_command(self._line.split()[0])
         cmd = cmd_class(self._line + ' ' + self.rest(1))
+        cmd.quickly_executed = self.quickly_executed
         cmd.quantifier = self.quantifier
         cmd.escape_macros_for_shell = self.escape_macros_for_shell
         cmd.resolve_macros = self.resolve_macros