summaryrefslogtreecommitdiffstats
path: root/Functions
diff options
context:
space:
mode:
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Misc/zargs16
1 files changed, 8 insertions, 8 deletions
diff --git a/Functions/Misc/zargs b/Functions/Misc/zargs
index 8350b1aba..71fd42835 100644
--- a/Functions/Misc/zargs
+++ b/Functions/Misc/zargs
@@ -167,14 +167,14 @@ if [[ $eof == -(e|-eof) ]]; then ((end=ARGC+1))
elif (( $#eof )); then end=$argv[(i)${eof##-(e|-eof=)}]
else end=$argv[(i)--]
fi
-local -a args call command; command=( ${argv[end+1,-1]} )
+local -a args call command; command=( "${(@)argv[end+1,-1]}" )
if (( $opts[(I)-(null|0)] ))
-then set -- ${(ps:\000:)argv[1,end-1]}
-else set -- $argv[1,end-1]
+then set -- "${(@ps:\000:)argv[1,end-1]}"
+else set -- "${(@)argv[1,end-1]}"
fi
-if [[ -n $command ]]
+if (( $#command ))
then (( c = $#command - 1 ))
else command=( print -r -- )
fi
@@ -187,7 +187,7 @@ local execute='
then print -u2 -r -- "$call"
fi