summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-03-21 14:50:41 +0100
committerhut <hut@lavabit.com>2012-03-21 14:55:09 +0100
commitc908fd3d47459b1059ed14452d6dd46f9c9b5353 (patch)
tree40b3e295cf1272c2c3f19b7aefeeb6bebcb53e44
parent8f343062c2eecea85fbd0a333b3bb1f121f00213 (diff)
downloadranger-c908fd3d47459b1059ed14452d6dd46f9c9b5353.tar.gz
ext.rifle: Fallback to '$label -- "$@"' if no command was found
-rwxr-xr-xranger/ext/rifle.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index f2dacf79..6f1ecbad 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -255,6 +255,10 @@ class Rifle(object):
 				break
 			else:
 				found_at_least_one = True
+		else:
+			if label and label in get_executables():
+				cmd = '%s -- "$@"' % label
+				command = self._build_command(files, cmd, flags)
 
 		# Execute command
 		if command is None: