From 0628802baf5c9245138db82dd058cad023a7d0ae Mon Sep 17 00:00:00 2001 From: Peter Stephenson Date: Thu, 29 Oct 2015 15:01:07 +0000 Subject: 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. --- Functions/Misc/add-zsh-hook | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Functions/Misc') diff --git a/Functions/Misc/add-zsh-hook b/Functions/Misc/add-zsh-hook index ee37d674d..fc39659ae 100644 --- a/Functions/Misc/add-zsh-hook +++ b/Functions/Misc/add-zsh-hook @@ -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 -- cgit 1.4.1