From 3861225f0bb175bc929a46bfdac5be40da78caf0 Mon Sep 17 00:00:00 2001 From: pancho horrillo Date: Mon, 8 Mar 2021 10:42:06 +0100 Subject: [PATCH] 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. --- bin/org-capture | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bin/org-capture b/bin/org-capture index d7e4538d5..c7075dcb6 100755 --- a/bin/org-capture +++ b/bin/org-capture @@ -30,7 +30,7 @@ shift $((OPTIND-1)) # use remaining args, else try stdin str="$*" -if [ -z $str ]; then +if [ -z "$str" ]; then str=$(cat) fi