Simplify argument handling

This commit is contained in:
Arun Prakash Jana 2017-06-30 05:27:25 +05:30
parent 04b9e8ec77
commit 5619ef4436
No known key found for this signature in database
GPG Key ID: A75979F35C080412
3 changed files with 3 additions and 11 deletions

View File

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

View File

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

View File

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