nnn

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

commit 5619ef443661a6ff586e20593dd396a7f416eab3
parent 04b9e8ec7734d31c32cc46612cc677df0cda0c0f
Author: Arun Prakash Jana <engineerarun@gmail.com>
Date:   Fri, 30 Jun 2017 05:27:25 +0530

Simplify argument handling

Diffstat:
Mmisc/quitcd/quitcd.bash | 6+-----
Mmisc/quitcd/quitcd.fish | 2+-
Mmisc/quitcd/quitcd.zsh | 6+-----
3 files changed, 3 insertions(+), 11 deletions(-)

diff --git 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 @@ -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 @@ -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