Browse Source

Simplify argument handling

master
Arun Prakash Jana 7 years ago
parent
commit
5619ef4436
No known key found for this signature in database GPG Key ID: A75979F35C080412
3 changed files with 3 additions and 11 deletions
  1. +1
    -5
      misc/quitcd/quitcd.bash
  2. +1
    -1
      misc/quitcd/quitcd.fish
  3. +1
    -5
      misc/quitcd/quitcd.zsh

+ 1
- 5
misc/quitcd/quitcd.bash 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


+ 1
- 1
misc/quitcd/quitcd.fish 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


+ 1
- 5
misc/quitcd/quitcd.zsh 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


Loading…
Cancel
Save