Remove extra splat for zsh arrays

It turns out that zsh will simply use the elements of an array as the parameters when referenced in
the shell without quotes
```
% cat t.py
import sys
print sys.argv

% typeset -a args
% args+=("./t.py")
% args+=("123
321")
% $args
['./t.py', '123\n321']
```
This commit is contained in:
PapaCharlie 2019-06-19 17:52:10 -07:00
parent 979059b9c4
commit 53e4e28648

View file

@ -91,7 +91,7 @@ function {{genZshFlagDynamicCompletionFuncName .}} {
return $?
fi
if ! error_message="$("${tokens[@]}" 2>&1 > "$output")" ; then
if ! error_message="$($tokens 2>&1 > "$output")" ; then
local st="$?"
_message "Exception occurred during completion: $error_message"
return "$st"
@ -102,7 +102,7 @@ function {{genZshFlagDynamicCompletionFuncName .}} {
args+="$line"
done < "$output"
_values "$1" "$args[@]"
_values "$1" $args
unset COBRA_FLAG_COMPLETION
rm "$output"