From 23b7f16961a7b679dec16f6ee91401a6b8f6ca82 Mon Sep 17 00:00:00 2001 From: hut Date: Mon, 5 Mar 2012 11:27:16 +0100 Subject: Added $RANGER_LEVEL environment variable (see man page) --- doc/ranger.pod | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'doc/ranger.pod') 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 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 -- cgit 1.4.1-2-gfad0