Fix 'too many arguments' error on org-capture
org-capture foo bar baz will fail with: org/capture: line 33: [: too many arguments Adding quotes to the expansion of $str will ensure that test -z has only one argument.
This commit is contained in:
parent
cf44c43f41
commit
3861225f0b
1 changed files with 1 additions and 1 deletions
|
@ -30,7 +30,7 @@ shift $((OPTIND-1))
|
||||||
|
|
||||||
# use remaining args, else try stdin
|
# use remaining args, else try stdin
|
||||||
str="$*"
|
str="$*"
|
||||||
if [ -z $str ]; then
|
if [ -z "$str" ]; then
|
||||||
str=$(cat)
|
str=$(cat)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue