mirror of
https://github.com/jarun/nnn.git
synced 2024-09-11 13:06:14 +03:00
slightly improve and optimize n.fish
The expr is redundant because `test -ge` treats strings as numbers already.
This commit is contained in:
parent
f6edcc41b9
commit
3dac035819
@ -4,11 +4,9 @@
|
||||
|
||||
function n --wraps nnn --description 'support nnn quit and change directory'
|
||||
# Block nesting of nnn in subshells
|
||||
if test -n "$NNNLVL"
|
||||
if [ (expr $NNNLVL + 0) -ge 1 ]
|
||||
echo "nnn is already running"
|
||||
return
|
||||
end
|
||||
if test -n "$NNNLVL" && test $NNNLVL -ge 1
|
||||
echo "nnn is already running"
|
||||
return
|
||||
end
|
||||
|
||||
# The behaviour is set to cd on quit (nnn checks if NNN_TMPFILE is set)
|
||||
|
Loading…
Reference in New Issue
Block a user