summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--ranger/core/actions.py7
-rw-r--r--ranger/core/runner.py2
-rw-r--r--ranger/help/starting.py1
3 files changed, 9 insertions, 1 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)
diff --git a/ranger/core/runner.py b/ranger/core/runner.py
index dd0cf06a..53bede29 100644
--- a/ranger/core/runner.py
+++ b/ranger/core/runner.py
@@ -37,7 +37,7 @@ from subprocess import Popen, PIPE
 from ranger.ext.waitpid_no_intr import waitpid_no_intr
 
 
-ALLOWED_FLAGS = 'sdpwSDPW'
+ALLOWED_FLAGS = 'sdpwcSDPWC'
 
 
 def press_enter():
diff --git a/ranger/help/starting.py b/ranger/help/starting.py
index 1796f83d..dbc6b6b5 100644
--- a/ranger/help/starting.py
+++ b/ranger/help/starting.py
@@ -103,6 +103,7 @@ Flags give you a way to modify the behaviour of the spawned process.
 	d	Detach the process.  (Run in background)
 	p	Redirect output to the pager
 	w	Wait for an enter-press when the process is done
+	c	Run the current file only, even when more files are marked
 
 For example, ":open_with p" will pipe the output of that process into
 the pager.
006-07-10 19:46:24 +0200 several new changes, made gridmenu working' href='/acidbong/suckless/dwm/commit/util.c?h=5.6.1&id=39677ec76616fe4165ef92afb14db2bef2488e30'>39677ec ^
6a3ae5e ^
39677ec ^


39677ec ^
ca65478 ^
adaa28a ^
dc5d967 ^
adaa28a ^


849e631 ^
adaa28a ^


2c477cf ^
9955ddc ^
dc5d967 ^
9955ddc ^

2c477cf ^
439e15d ^
4230932 ^

439e15d ^



16c67f3 ^
2c477cf ^

439e15d ^

0464e42 ^
439e15d ^


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52