nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 2f6c180433f9f0e32eac7f1fea90a6f4032590d6
parent 79b3688e492316eeca956d66ea90194582a4a3b1
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Wed, 29 Sep 2021 19:16:58 +0530

Improve docs in cd on quit scripts

Diffstat:
Mmisc/quitcd/quitcd.bash_zsh | 8+++++---
Mmisc/quitcd/quitcd.csh | 5+++--
Mmisc/quitcd/quitcd.fish | 4+++-
3 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/misc/quitcd/quitcd.bash_zsh b/misc/quitcd/quitcd.bash_zsh @@ -6,9 +6,11 @@ n () return fi - # The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set) - # To cd on quit only on ^G, remove the "export" as in: - # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" + # The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set) + # To cd on quit only on ^G, either remove the "export" as in: + # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" + # (or, to a custom path: NNN_TMPFILE=/tmp/.lastd) + # or, export NNN_TMPFILE after nnn invocation export NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" # Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn diff --git a/misc/quitcd/quitcd.csh b/misc/quitcd/quitcd.csh @@ -1,7 +1,8 @@ # NOTE: set NNN_TMPFILE correctly if you use 'XDG_CONFIG_HOME' -# The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set) -# To cd on quit only on ^G, export NNN_TMPFILE after the call to nnn +# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set) +# To cd on quit only on ^G, set NNN_TMPFILE after nnn invocation +# A custom path can also be set e.g. set NNN_TMPFILE=/tmp/.lastd set NNN_TMPFILE=~/.config/nnn/.lastd # Unmask ^Q (, ^V etc.) (if required, see `stty -a`) to Quit nnn diff --git a/misc/quitcd/quitcd.fish b/misc/quitcd/quitcd.fish @@ -11,9 +11,11 @@ function n --wraps nnn --description 'support nnn quit and change directory' end end - # The default behaviour is to cd on quit (nnn checks if NNN_TMPFILE is set) + # The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set) # To cd on quit only on ^G, remove the "-x" as in: # set NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd" + # (or, to a custom path: set NNN_TMPFILE "/tmp/.lastd") + # or, export NNN_TMPFILE after nnn invocation if test -n "$XDG_CONFIG_HOME" set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd" else