about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-04-13 00:12:13 +0200
committerhut <hut@lavabit.com>2012-04-13 00:14:59 +0200
commit654a81cacb2c8cf02d32c911fc87bc8d62fae698 (patch)
treef89fa3e219bc71473531038cdfbfe22e094bfbc6
parente8bbfe62969f11d2c30ef73f9c1c2aaabe3648e0 (diff)
downloadranger-654a81cacb2c8cf02d32c911fc87bc8d62fae698.tar.gz
ext.rifle: Fix passing flags from actions.py to rifle.py
-rw-r--r--ranger/core/actions.py4
-rwxr-xr-xranger/ext/rifle.py4
2 files changed, 4 insertions, 4 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index 1fae51b2..2102cf2d 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -293,8 +293,8 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		elif type(files) not in (list, tuple):
 			files = [files]
 
-		flags = squash_flags(kw.get('flags', ''))
-		if 'c' in flags:
+		flags = kw.get('flags', '')
+		if 'c' in squash_flags(flags):
 			files = [self.fm.env.cf]
 
 		self.signal_emit('execute.before', keywords=kw)
diff --git a/ranger/ext/rifle.py b/ranger/ext/rifle.py
index daf9381f..59351095 100755
--- a/ranger/ext/rifle.py
+++ b/ranger/ext/rifle.py
@@ -249,10 +249,10 @@ class Rifle(object):
 		found_at_least_one = None
 
 		# Determine command
-		for count, cmd, lbl, flags in self.list_commands(files, mimetype):
+		for count, cmd, lbl, flgs in self.list_commands(files, mimetype):
 			if label and label == lbl or not label and count == number:
 				cmd = self.hook_command_preprocessing(cmd)
-				command = self._build_command(files, cmd, flags)
+				command = self._build_command(files, cmd, flags + flgs)
 				break
 			else:
 				found_at_least_one = True