Fix: BSD expr syntax error on empty $NNNLVL (#546)

This commit is contained in:
Rami3L 2020-05-02 12:14:19 +08:00 committed by GitHub
parent cb202e128b
commit 45a69f1cbf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,7 +4,7 @@
function n --description 'support nnn quit and change directory'
# Block nesting of nnn in subshells
if test -n NNNLVL
if test -n "$NNNLVL"
if [ (expr $NNNLVL + 0) -ge 1 ]
echo "nnn is already running"
return