summaryrefslogtreecommitdiff
path: root/Functions/Misc/add-zle-hook-widget
diff options
context:
space:
mode:
authorPeter Stephenson <p.stephenson@samsung.com>2022-10-17 16:21:01 +0100
committerPeter Stephenson <p.stephenson@samsung.com>2022-10-17 16:21:01 +0100
commitb82e8e10355aba96cf3cf4e75bae71a6a3f8b235 (patch)
treebe0adaf45e61cbe09bb3ac77223b80ef08533a29 /Functions/Misc/add-zle-hook-widget
parent727b493e2b782fca0f3933865faa9a0a6ab1a2c4 (diff)
downloadzsh-b82e8e10355aba96cf3cf4e75bae71a6a3f8b235.tar.gz
zsh-b82e8e10355aba96cf3cf4e75bae71a6a3f8b235.zip
50786: Make match etc. local when used in styles.
Avoids side effects of add-zle-hook-widget.
Diffstat (limited to 'Functions/Misc/add-zle-hook-widget')
-rw-r--r--Functions/Misc/add-zle-hook-widget4
1 files changed, 2 insertions, 2 deletions
diff --git a/Functions/Misc/add-zle-hook-widget b/Functions/Misc/add-zle-hook-widget
index 4d8049083..4293a07dd 100644
--- a/Functions/Misc/add-zle-hook-widget
+++ b/Functions/Misc/add-zle-hook-widget
@@ -39,7 +39,7 @@ zstyle zle-hook types ${hooktypes#zle-}
# Relying on multifuncdef option here
function azhw:${^hooktypes} {
- local -a hook_widgets
+ local -a hook_widgets match mbegin mend
local hook
# Values of these styles look like number:name
# and we run them in number order
@@ -58,7 +58,7 @@ function azhw:${^hooktypes} {
# Redefine ourself with the setup left out
function add-zle-hook-widget {
- local -a hooktypes
+ local -a hooktypes match mbegin mend
zstyle -a zle-hook types hooktypes
# This part copied from add-zsh-hook