mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-06-20 10:08:02 +02:00
unposted: extra quoting of words in "eval" for safety
This commit is contained in:
parent
d82ea848bf
commit
d95197a2ec
2 changed files with 6 additions and 2 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2023-09-09 Bart Schaefer <schaefer@zsh.org>
|
||||||
|
|
||||||
|
* unposted: Completion/Base/Utility/_shadow: quoting for safety
|
||||||
|
|
||||||
2023-09-07 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
2023-09-07 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
|
||||||
|
|
||||||
* 52114: Completion/Unix/Command/_nice: improve _nice (support
|
* 52114: Completion/Unix/Command/_nice: improve _nice (support
|
||||||
|
|
|
@ -55,10 +55,10 @@ _shadow() {
|
||||||
fnames+=(f@$fname)
|
fnames+=(f@$fname)
|
||||||
elif (( ${+builtins[$fname]} ))
|
elif (( ${+builtins[$fname]} ))
|
||||||
then
|
then
|
||||||
eval "function -- $shadowname { builtin $fname \"\$@\" }"
|
eval "function -- ${(q-)shadowname} { builtin ${(q-)fname} \"\$@\" }"
|
||||||
fnames+=(b@$fname)
|
fnames+=(b@$fname)
|
||||||
else
|
else
|
||||||
eval "function -- $shadowname { command $fname \"\$@\" }"
|
eval "function -- ${(q-)shadowname} { command ${(q-)fname} \"\$@\" }"
|
||||||
fnames+=(c@$fname)
|
fnames+=(c@$fname)
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
Loading…
Reference in a new issue