summaryrefslogtreecommitdiff
path: root/Functions
diff options
context:
space:
mode:
authorPeter Stephenson <pws@zsh.org>2015-10-29 15:01:07 +0000
committerPeter Stephenson <pws@zsh.org>2015-10-29 15:01:07 +0000
commit0628802baf5c9245138db82dd058cad023a7d0ae (patch)
treebdbc600fe01ccbac2fb1b34814626a53f909c806 /Functions
parent9640e9f497e8d78bf0bfa9defc4cfdeba1e7bfae (diff)
downloadzsh-0628802baf5c9245138db82dd058cad023a7d0ae.tar.gz
zsh-0628802baf5c9245138db82dd058cad023a7d0ae.zip
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.
Diffstat (limited to 'Functions')
-rw-r--r--Functions/MIME/zsh-mime-setup2
-rw-r--r--Functions/Misc/add-zsh-hook2
2 files changed, 3 insertions, 1 deletions
diff --git a/Functions/MIME/zsh-mime-setup b/Functions/MIME/zsh-mime-setup
index 23e44fdc0..35f6e6b6b 100644
--- a/Functions/MIME/zsh-mime-setup
+++ b/Functions/MIME/zsh-mime-setup
@@ -1,7 +1,7 @@
emulate -L zsh
setopt extendedglob cbases
-local opt o_verbose o_list
+local opt o_verbose o_list i
autoload -Uz zsh-mime-handler
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