summary refs log tree commit diff stats
path: root/doc/ranger.pod
diff options
context:
space:
mode:
Diffstat (limited to 'doc/ranger.pod')
-rw-r--r--doc/ranger.pod45
1 files changed, 44 insertions, 1 deletions
diff --git a/doc/ranger.pod b/doc/ranger.pod
index 069b9de1..9f8b4f04 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -67,6 +67,10 @@ selected files into I<targetfile>, adding one newline after each filename.
 Allows you to pick a directory with ranger.  When you exit ranger, it will
 write the last visited directory into I<targetfile>.
 
+=item B<--selectfile>=I<targetfile>
+
+Open ranger with I<targetfile> selected.
+
 =item B<--copy-config>=I<file>
 
 Create copies of the default configuration files in your local configuration
@@ -79,6 +83,11 @@ List common keys which are not bound to any action in the "browser" context.
 This list is not complete, you can bind any key that is supported by curses:
 use the key code returned by C<getch()>.
 
+=item B<--list-tagged-files>=I<tag>
+
+List all files which are tagged with the given tag.  Note: Tags are single
+characters.  The default tag is "*"
+
 =item B<--fail-unless-cd>
 
 Return the exit code 1 if ranger is used to run a file instead of used for file
@@ -95,6 +104,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.
@@ -186,11 +200,16 @@ used in the commands :open_with (key "r") and :shell (key "!").
  p   Redirect output to the pager
  w   Wait for an Enter-press when the process is done
  c   Run the current file only, instead of the selection
+ r   Run application with root privilege (requires sudo)
+ t   Run application in a new terminal window
 
 By default, all the flags are off unless specified otherwise in the F<apps.py>
 configuration file.  You can specify as many flags as you want.  An uppercase
 flag negates the effect: "ddcccDs" is equivalent to "cs".
 
+The "t" flag looks for the environment variable TERMCMD, and uses it as the
+terminal command, if it's not set it'll use xterm.
+
 Examples: C<:open_with p> will pipe the output of that process into
 the pager.  C<:shell -w df> will run "df" and wait for you to press Enter before
 switching back to ranger.
@@ -778,6 +797,10 @@ it by typing `` or '' the next time you start ranger.
 Rename the current file.  If a file with that name already exists, the renaming
 will fail.  Also try the key binding A for appending something to a file name.
 
+=item relink I<newpath>
+
+Change the link destination of the current symlink file to <newpath>. First <tab> will load the original link.
+
 =item save_copy_buffer
 
 Save the copy buffer from I<~/.config/ranger/copy_buffer>.  This can be used to
@@ -937,6 +960,12 @@ These environment variables have an effect on ranger:
 
 =over 8
 
+=item RANGER_LEVEL
+
+Ranger sets this environment variable to "1" or increments it if it already
+exists.  External programs can determine whether they were spawned from ranger
+by checking for this variable.
+
 =item EDITOR
 
 Defines the editor to be used for the "E" key.  Defaults to the first installed
@@ -947,6 +976,13 @@ program out of "vim", "emacs" and "nano".
 Defines the shell that ranger is going to use with the :shell command and
 the "S" key.  Defaults to "bash".
 
+=item TERMCMD
+
+Defines the terminal emulator command that ranger is going to use with the
+:terminal command and the "t" run flag.  Defaults to "x-terminal-emulator" or
+"xterm"
+
+
 =item XDG_CONFIG_HOME
 
 Specifies the directory for configuration files. Defaults to F<$HOME/.config>.
@@ -968,13 +1004,20 @@ docstrings.  Using this will disable the <F1> key on commands.
 
 =head1 EXAMPLES
 
+=head2 BASH: Display that the shell spawned from ranger:
+
+By putting this in ~/.bashrc, "(in ranger) " will be displayed next to your
+prompt to notify you that the shell spawned from ranger.
+
+ [ -n "$RANGER_LEVEL" ] && PS1="$PS1"'(in ranger) '
+
 =head2 VIM: File Chooser
 
 This is a vim function which allows you to use ranger to select a file for
 opening in your current vim session.
 
  fun! RangerChooser()
-   silent !ranger --choosefile=/tmp/chosenfile `[ -z '%' ] && echo -n . || dirname %`
+   exec "silent !ranger --choosefile=/tmp/chosenfile " . expand("%:p:h")
    if filereadable('/tmp/chosenfile')
      exec 'edit ' . system('cat /tmp/chosenfile')
      call system('rm /tmp/chosenfile')
c/ranger.gui.bar.html?h=v1.1.2&id=2ca2e862e616eba862ac80f5ee0003d1aa984a32'>^
34a60763 ^

4c13e1f2 ^























34a60763 ^
4c13e1f2 ^





34a60763 ^



4c13e1f2 ^







34a60763 ^



4c13e1f2 ^



















34a60763 ^
4c13e1f2 ^




34a60763 ^



4c13e1f2 ^

34a60763 ^
4c13e1f2 ^


34a60763 ^
4c13e1f2 ^



34a60763 ^
4c13e1f2 ^

34a60763 ^
4c13e1f2 ^





34a60763 ^

4c13e1f2 ^

34a60763 ^
4c13e1f2 ^

c776804d ^
4c13e1f2 ^




34a60763 ^
4c13e1f2 ^




















4c13e1f2 ^

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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235