misc/quitcd/quitcd.bash_zsh | 8 ++++---- misc/quitcd/quitcd.csh | 5 +++-- misc/quitcd/quitcd.fish | 7 +++---- diff --git a/misc/quitcd/quitcd.bash_zsh b/misc/quitcd/quitcd.bash_zsh index 76b9d4029aed0da0906380a7bd531aa0f065ece5..f1d93f10d2ae4010841303789b09a9b781f7b7bb 100644 --- a/misc/quitcd/quitcd.bash_zsh +++ b/misc/quitcd/quitcd.bash_zsh @@ -7,10 +7,10 @@ return fi # 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 + # If NNN_TMPFILE is set to a custom path, it must be exported for nnn to + # see. To cd on quit only on ^G, remove the "export" and make sure not to + # use a custom path, i.e. set NNN_TMPFILE *exactly* as follows: + # NNN_TMPFILE="${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd" 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 index c1ca743b7747a2a0c12cd554247f841ee2bdec2f..5102e5af738535729fe89a14eb97101d8c7c948a 100644 --- a/misc/quitcd/quitcd.csh +++ b/misc/quitcd/quitcd.csh @@ -1,8 +1,9 @@ # NOTE: set NNN_TMPFILE correctly if you use 'XDG_CONFIG_HOME' # 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 +# If NNN_TMPFILE is set to a custom path, it must be exported for nnn to see. +# To cd on quit only on ^G, set NNN_TMPFILE after the nnn invocation, and make +# sure not to use a custom path. 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 index 2e63395f4a9c7c9fedc2e3aafc72431a8db06b6d..9f85fffcf62231a82207a944e9cf640f01dd219b 100644 --- a/misc/quitcd/quitcd.fish +++ b/misc/quitcd/quitcd.fish @@ -12,10 +12,9 @@ end end # 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 NNN_TMPFILE is set to a custom path, it must be exported for nnn to + # see. To cd on quit only on ^G, remove the "-x" from both lines below, + # without changing the paths. if test -n "$XDG_CONFIG_HOME" set -x NNN_TMPFILE "$XDG_CONFIG_HOME/nnn/.lastd" else