summary refs log tree commit diff stats
path: root/doc/ranger.pod
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2012-03-05 11:27:16 +0100
committerhut <hut@lavabit.com>2012-03-05 11:38:42 +0100
commit23b7f16961a7b679dec16f6ee91401a6b8f6ca82 (patch)
tree22dae0662d03ce8562159d9196fd8c854d6af009 /doc/ranger.pod
parent6b1666df4664482644efb270f4e0215b469c8ffc (diff)
downloadranger-23b7f16961a7b679dec16f6ee91401a6b8f6ca82.tar.gz
Added $RANGER_LEVEL environment variable (see man page)
Diffstat (limited to 'doc/ranger.pod')
-rw-r--r--doc/ranger.pod13
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/ranger.pod b/doc/ranger.pod
index e8c45826..9f8b4f04 100644
--- a/doc/ranger.pod
+++ b/doc/ranger.pod
@@ -960,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
@@ -998,6 +1004,13 @@ 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
f='#n166'>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