From 34ecf3ce13c94fec468b1a056ec11b801c9853d4 Mon Sep 17 00:00:00 2001 From: Pavel Fokin Date: Mon, 8 Jul 2019 20:13:52 +0300 Subject: Fix quitcd snippets for 'zsh' and 'bash' --- misc/quitcd/quitcd.bash | 4 ++-- misc/quitcd/quitcd.zsh | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'misc/quitcd') diff --git a/misc/quitcd/quitcd.bash b/misc/quitcd/quitcd.bash index 3f9f7fc..15b9f42 100644 --- a/misc/quitcd/quitcd.bash +++ b/misc/quitcd/quitcd.bash @@ -1,9 +1,9 @@ n() { - nnn "$@" - NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd + nnn "$@" + if [ -f $NNN_TMPFILE ]; then . $NNN_TMPFILE rm -f $NNN_TMPFILE > /dev/null diff --git a/misc/quitcd/quitcd.zsh b/misc/quitcd/quitcd.zsh index 24860ac..207aa56 100644 --- a/misc/quitcd/quitcd.zsh +++ b/misc/quitcd/quitcd.zsh @@ -1,9 +1,9 @@ n() { - nnn "$@" - NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd + nnn "$@" + if [ -f $NNN_TMPFILE ]; then . $NNN_TMPFILE rm $NNN_TMPFILE -- cgit v1.2.3-70-g09d2