diff options
-rw-r--r-- | misc/quitcd/quitcd.bash | 6 | ||||
-rw-r--r-- | misc/quitcd/quitcd.fish | 2 | ||||
-rw-r--r-- | misc/quitcd/quitcd.zsh | 6 |
3 files changed, 3 insertions, 11 deletions
diff --git a/misc/quitcd/quitcd.bash b/misc/quitcd/quitcd.bash index 5248036..dc83b23 100644 --- a/misc/quitcd/quitcd.bash +++ b/misc/quitcd/quitcd.bash @@ -2,11 +2,7 @@ export NNN_TMPFILE="/tmp/nnn" n() { - if [ -n "$1" ]; then - nnn "$1" - else - nnn - fi + nnn "$@" if [ -f $NNN_TMPFILE ]; then . $NNN_TMPFILE diff --git a/misc/quitcd/quitcd.fish b/misc/quitcd/quitcd.fish index 59a7f1b..079f33e 100644 --- a/misc/quitcd/quitcd.fish +++ b/misc/quitcd/quitcd.fish @@ -1,7 +1,7 @@ export NNN_TMPFILE="/tmp/nnn" function n --description 'support nnn quit and change directory' - nnn $argv[1] + nnn $argv if test -e $NNN_TMPFILE . $NNN_TMPFILE diff --git a/misc/quitcd/quitcd.zsh b/misc/quitcd/quitcd.zsh index 5248036..dc83b23 100644 --- a/misc/quitcd/quitcd.zsh +++ b/misc/quitcd/quitcd.zsh @@ -2,11 +2,7 @@ export NNN_TMPFILE="/tmp/nnn" n() { - if [ -n "$1" ]; then - nnn "$1" - else - nnn - fi + nnn "$@" if [ -f $NNN_TMPFILE ]; then . $NNN_TMPFILE |