aboutsummaryrefslogtreecommitdiffstats
path: root/misc/quitcd/quitcd.bash
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-16 22:21:13 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2019-06-17 07:04:42 +0530
commit794a0e27091b63f997fc829d0288cde5a4a2edbd (patch)
tree384695218b8cf09700df81715627004124e0edf7 /misc/quitcd/quitcd.bash
parentaa56b99326a12f5bbab6d5a693755060e81e44a2 (diff)
downloadnnn-794a0e27091b63f997fc829d0288cde5a4a2edbd.tar.gz
Move scripts to misc
Diffstat (limited to 'misc/quitcd/quitcd.bash')
-rw-r--r--misc/quitcd/quitcd.bash11
1 files changed, 11 insertions, 0 deletions
diff --git a/misc/quitcd/quitcd.bash b/misc/quitcd/quitcd.bash
new file mode 100644
index 0000000..3f9f7fc
--- /dev/null
+++ b/misc/quitcd/quitcd.bash
@@ -0,0 +1,11 @@
+n()
+{
+ nnn "$@"
+
+ NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd
+
+ if [ -f $NNN_TMPFILE ]; then
+ . $NNN_TMPFILE
+ rm -f $NNN_TMPFILE > /dev/null
+ fi
+}