summary refs log tree commit diff stats
path: root/doc/ranger.1
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.1
parent6b1666df4664482644efb270f4e0215b469c8ffc (diff)
downloadranger-23b7f16961a7b679dec16f6ee91401a6b8f6ca82.tar.gz
Added $RANGER_LEVEL environment variable (see man page)
Diffstat (limited to 'doc/ranger.1')
-rw-r--r--doc/ranger.113
1 files changed, 13 insertions, 0 deletions
diff --git a/doc/ranger.1 b/doc/ranger.1
index 823b31c7..433bb8a7 100644
--- a/doc/ranger.1
+++ b/doc/ranger.1
@@ -872,6 +872,11 @@ with T.  To assign a named tag, type "<tagname>.
 .SH "ENVIRONMENT"
 .IX Header "ENVIRONMENT"
 These environment variables have an effect on ranger:
+.IP "\s-1RANGER_LEVEL\s0" 8
+.IX Item "RANGER_LEVEL"
+Ranger sets this environment variable to \*(L"1\*(R" or increments it if it already
+exists.  External programs can determine whether they were spawned from ranger
+by checking for this variable.
 .IP "\s-1EDITOR\s0" 8
 .IX Item "EDITOR"
 Defines the editor to be used for the \*(L"E\*(R" key.  Defaults to the first installed
@@ -899,6 +904,14 @@ Using PYTHONOPTIMIZE=2 (like python \-OO) will additionally discard any
 docstrings.  Using this will disable the <F1> key on commands.
 .SH "EXAMPLES"
 .IX Header "EXAMPLES"
+.SS "\s-1BASH:\s0 Display that the shell spawned from ranger:"
+.IX Subsection "BASH: Display that the shell spawned from ranger:"
+By putting this in ~/.bashrc, \*(L"(in ranger) \*(R" will be displayed next to your
+prompt to notify you that the shell spawned from ranger.
+.PP
+.Vb 1
+\& [ \-n "$RANGER_LEVEL" ] && PS1="$PS1"\*(Aq(in ranger) \*(Aq
+.Ve
 .SS "\s-1VIM:\s0 File Chooser"
 .IX Subsection "VIM: File Chooser"
 This is a vim function which allows you to use ranger to select a file for