summaryrefslogtreecommitdiff
path: root/Completion/Base
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2023-09-09 22:11:50 -0700
committerBart Schaefer <schaefer@zsh.org>2023-09-09 22:11:50 -0700
commitd95197a2ec43c79958aaf198189d4f138422a331 (patch)
treefb518f764501343955e64b8499708186769e2701 /Completion/Base
parentd82ea848bf1350c5f0d668801ff9355ac4e0ad7f (diff)
downloadzsh-d95197a2ec43c79958aaf198189d4f138422a331.tar.gz
zsh-d95197a2ec43c79958aaf198189d4f138422a331.zip
unposted: extra quoting of words in "eval" for safety
Diffstat (limited to 'Completion/Base')
-rw-r--r--Completion/Base/Utility/_shadow4
1 files changed, 2 insertions, 2 deletions
diff --git a/Completion/Base/Utility/_shadow b/Completion/Base/Utility/_shadow
index b5a8acb24..9e78af38f 100644
--- a/Completion/Base/Utility/_shadow
+++ b/Completion/Base/Utility/_shadow
@@ -55,10 +55,10 @@ _shadow() {
fnames+=(f@$fname)
elif (( ${+builtins[$fname]} ))
then
- eval "function -- $shadowname { builtin $fname \"\$@\" }"
+ eval "function -- ${(q-)shadowname} { builtin ${(q-)fname} \"\$@\" }"
fnames+=(b@$fname)
else
- eval "function -- $shadowname { command $fname \"\$@\" }"
+ eval "function -- ${(q-)shadowname} { command ${(q-)fname} \"\$@\" }"
fnames+=(c@$fname)
fi
done