1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-10-24 04:50:27 +02:00

37014: Improved internal parameter setting.

Enhance WARNCREATEGLOBAL to work in many more cases.

Don't create REPLY as an integer if it didn't previously exist
as one, even if the value to be set is integral, as this is likely to
mess up later uses of REPLY.
This commit is contained in:
Peter Stephenson 2015-10-29 15:01:07 +00:00
parent 9640e9f497
commit 0628802baf
9 changed files with 94 additions and 29 deletions

View file

@ -82,9 +82,11 @@ if (( del )); then
else
if (( ${(P)+hook} )); then
if (( ${${(P)hook}[(I)$fn]} == 0 )); then
typeset -ga $hook
set -A $hook ${(P)hook} $fn
fi
else
typeset -ga $hook
set -A $hook $fn
fi
autoload $autoopts -- $fn