aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/quitcd/quitcd.zsh
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-07 21:53:27 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-07 21:58:45 +0530
commitfa4f082ac0d1789b10c7b8465c43aa083a5d82d6 (patch)
tree8449891f01e5bbe7c678e861153b042331629ebe /scripts/quitcd/quitcd.zsh
parentcd458b9ab444b1b38ce5fc23f4fe81460728e923 (diff)
downloadnnn-fa4f082ac0d1789b10c7b8465c43aa083a5d82d6.tar.gz
Move cd on quit file
The new location is ~/.config/nnn/.lastd
Diffstat (limited to 'scripts/quitcd/quitcd.zsh')
-rw-r--r--scripts/quitcd/quitcd.zsh14
1 files changed, 7 insertions, 7 deletions
diff --git a/scripts/quitcd/quitcd.zsh b/scripts/quitcd/quitcd.zsh
index dc83b23..79f5a03 100644
--- a/scripts/quitcd/quitcd.zsh
+++ b/scripts/quitcd/quitcd.zsh
@@ -1,11 +1,11 @@
-export NNN_TMPFILE="/tmp/nnn"
-
n()
{
- nnn "$@"
+ nnn "$@"
+
+ NNN_TMPFILE=~/.config/nnn/.lastd
- if [ -f $NNN_TMPFILE ]; then
- . $NNN_TMPFILE
- rm $NNN_TMPFILE
- fi
+ if [ -f $NNN_TMPFILE ]; then
+ . $NNN_TMPFILE
+ rm $NNN_TMPFILE
+ fi
}