Fix quitcd snippets for 'zsh' and 'bash'

This commit is contained in:
Pavel Fokin 2019-07-08 20:13:52 +03:00
parent bf28a096ba
commit 34ecf3ce13
2 changed files with 4 additions and 4 deletions

View file

@ -1,9 +1,9 @@
n() n()
{ {
nnn "$@"
NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd
nnn "$@"
if [ -f $NNN_TMPFILE ]; then if [ -f $NNN_TMPFILE ]; then
. $NNN_TMPFILE . $NNN_TMPFILE
rm -f $NNN_TMPFILE > /dev/null rm -f $NNN_TMPFILE > /dev/null

View file

@ -1,9 +1,9 @@
n() n()
{ {
nnn "$@"
NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd NNN_TMPFILE=${XDG_CONFIG_HOME:-$HOME/.config}/nnn/.lastd
nnn "$@"
if [ -f $NNN_TMPFILE ]; then if [ -f $NNN_TMPFILE ]; then
. $NNN_TMPFILE . $NNN_TMPFILE
rm $NNN_TMPFILE rm $NNN_TMPFILE