summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--doc/ranger.16
-rw-r--r--doc/ranger.pod5
-rw-r--r--ranger/core/helper.py5
-rw-r--r--ranger/core/main.py3
4 files changed, 15 insertions, 4 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1
index 06b08d50..e58008e0 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -124,7 +124,7 @@
 .\" ========================================================================
 .\"
 .IX Title "RANGER 1"
-.TH RANGER 1 "ranger-1.5.2" "10/24/2011" "ranger manual"
+.TH RANGER 1 "ranger-1.5.2" "02/12/2012" "ranger manual"
 .\" For nroff, turn off justification.  Always turn off hyphenation; it makes
 .\" way too many mistakes in technical documents.
 .if n .ad l
@@ -204,6 +204,10 @@ the execution of this file type is explicitly handled in the configuration.
 When a filename is supplied, run it with the given \fIflags\fR to modify
 behavior.  The execution of this file type is explicitly handled in the
 configuration.
+.IP "\fB\-\-cmd\fR=\fIcommand\fR" 14
+.IX Item "--cmd=command"
+Execute the command after the configuration has been read.  Use this option
+multiple times to run multiple commands.
 .IP "\fB\-\-version\fR" 14
 .IX Item "--version"
 Print the version and exit.
diff --git a/doc/ranger.pod b/doc/ranger.pod
index 93b69999..0799f35d 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -99,6 +99,11 @@ When a filename is supplied, run it with the given I<flags> to modify
 behavior.  The execution of this file type is explicitly handled in the
 configuration.
 
+=item B<--cmd>=I<command>
+
+Execute the command after the configuration has been read.  Use this option
+multiple times to run multiple commands.
+
 =item B<--version>
 
 Print the version and exit.
diff --git a/ranger/core/helper.py b/ranger/core/helper.py
index 3f93e79c..c556b9bd 100644
--- a/ranger/core/helper.py
+++ b/ranger/core/helper.py
@@ -73,8 +73,9 @@ def parse_arguments():
 			help="List all files which are tagged with the given tag, default: *")
 	parser.add_option('--profile', action='store_true',
 			help="Print statistics of CPU usage on exit.")
-	parser.add_option('--cmd', type='string', metavar='COMMAND',
-			help="COMMAND will be executed after ranger has initialized")
+	parser.add_option('--cmd', action='append', type='string', metavar='COMMAND',
+			help="Execute COMMAND after the configuration has been read. "
+			"Use this option multiple times to run multiple commands.")
 
 	options, positional = parser.parse_args()
 	arg = OpenStruct(options.__dict__, targets=positional)
diff --git a/ranger/core/main.py b/ranger/core/main.py
index f80ee2d6..a17c6863 100644
--- a/ranger/core/main.py
+++ b/ranger/core/main.py
@@ -123,7 +123,8 @@ def main():
 		fm.ui.initialize()
 
 		if arg.cmd:
-			fm.execute_console(arg.cmd)
+			for command in arg.cmd:
+				fm.execute_console(command)
 
 		if ranger.arg.profile:
 			import cProfile
tle='author hut <hut@lavabit.com> 2013-06-10 01:08:30 +0200 committer hut <hut@lavabit.com> 2013-06-10 01:08:30 +0200 doc/colorschemes.txt: update' href='/akspecs/ranger/commit/doc/colorschemes.txt?h=v1.9.2&id=29b05d00bf3ff1dab8d2e25a81ab7e9d31791c6e'>29b05d00 ^
efdc7b16 ^
f597489c ^


efdc7b16 ^

a8f9cf2c ^

efdc7b16 ^






f597489c ^
efdc7b16 ^






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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92