next: fix empty $2 case
This commit is contained in:
parent
a5c9e54b5a
commit
0d5b187864
1 changed files with 7 additions and 6 deletions
|
|
@ -28,13 +28,14 @@ NEXTFILE=`$UMBASEPATH/last.sh | awk -f $UMBASEPATH/next.awk -v arg=$1`
|
||||||
|
|
||||||
# tag is optional second arg to this script
|
# tag is optional second arg to this script
|
||||||
TAGINSERT='(previous-line) (insert "+ %s\\n") (next-line)'
|
TAGINSERT='(previous-line) (insert "+ %s\\n") (next-line)'
|
||||||
|
if [ $2 ]; then
|
||||||
# + means insert the string descriptor as tag
|
# + means insert the string descriptor as tag
|
||||||
if [ $2 = '+' ]; then
|
if [ $2 = '+' ]; then
|
||||||
UMTAG=$(printf "$TAGINSERT" "$1")
|
UMTAG=$(printf "$TAGINSERT" "$1")
|
||||||
elif [ $2 ]; then
|
else
|
||||||
UMTAG=$(printf "$TAGINSERT" "$2")
|
UMTAG=$(printf "$TAGINSERT" "$2")
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# HACK: emacs won't accept piped input as a file name, so we use --eval to open
|
# HACK: emacs won't accept piped input as a file name, so we use --eval to open
|
||||||
# the file via find-file.
|
# the file via find-file.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue