zsh:diffcmds(): Add a layer of quotation
Add a layer of quotation as eval removes one. For example using parameters in single quotes would still be expanded.
This commit is contained in:
@@ -670,7 +670,7 @@ diffcmds() {
|
|||||||
|
|
||||||
cmdline=("$cmd")
|
cmdline=("$cmd")
|
||||||
for arg in "${@:$((i+1))}"; do
|
for arg in "${@:$((i+1))}"; do
|
||||||
cmdline+=("=(" "${(@)${@:1:$((i-1))}//\%\%/$arg}" ")")
|
cmdline+=("=(" "${(q@)${@:1:$((i-1))}//\%\%/$arg}" ")")
|
||||||
done
|
done
|
||||||
eval "$cmdline[@]"
|
eval "$cmdline[@]"
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user