aboutsummaryrefslogtreecommitdiffstats
path: root/misc/quitcd/quitcd.bash
diff options
context:
space:
mode:
Diffstat (limited to 'misc/quitcd/quitcd.bash')
-rw-r--r--misc/quitcd/quitcd.bash2
1 files changed, 2 insertions, 0 deletions
diff --git a/misc/quitcd/quitcd.bash b/misc/quitcd/quitcd.bash
index e303b4c..a26395d 100644
--- a/misc/quitcd/quitcd.bash
+++ b/misc/quitcd/quitcd.bash
@@ -1,5 +1,7 @@
n()
{
+ # 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
export NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd
nnn "$@"