about summary refs log tree commit diff stats
path: root/ranger/core/actions.py
diff options
context:
space:
mode:
Diffstat (limited to 'ranger/core/actions.py')
-rw-r--r--ranger/core/actions.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/ranger/core/actions.py b/ranger/core/actions.py
index d77f2a86..c8dffa55 100644
--- a/ranger/core/actions.py
+++ b/ranger/core/actions.py
@@ -163,6 +163,13 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware):
 		elif type(files) not in (list, tuple):
 			files = [files]
 
+		if 'flags' in kw:
+			from ranger.core.runner import Context
+			context = Context(files=list(files), flags=kw['flags'])
+			context.squash_flags()
+			if 'c' in context.flags:
+				files = [self.fm.env.cf]
+
 		self.signal_emit('execute.before', keywords=kw)
 		try:
 			return self.run(files=list(files), **kw)