summaryrefslogtreecommitdiff
path: root/Functions/Misc/add-zsh-hook
diff options
context:
space:
mode:
Diffstat (limited to 'Functions/Misc/add-zsh-hook')
-rw-r--r--Functions/Misc/add-zsh-hook2
1 files changed, 2 insertions, 0 deletions
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