From 2c0c75a8ee9a0f212eebbe4ee91ca5884f18e52f Mon Sep 17 00:00:00 2001 From: Matthew Martin Date: Tue, 6 Mar 2018 11:31:50 -0600 Subject: [PATCH] driver, main: Add -z to autoload calls --- highlighters/main/main-highlighter.zsh | 2 +- zsh-syntax-highlighting.zsh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index baf4193..83d93e8 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -1074,7 +1074,7 @@ _zsh_highlight_main__precmd_hook() { _zsh_highlight_main__command_type_cache=() } -autoload -U add-zsh-hook +autoload -Uz add-zsh-hook if add-zsh-hook precmd _zsh_highlight_main__precmd_hook 2>/dev/null; then # Initialize command type cache typeset -gA _zsh_highlight_main__command_type_cache diff --git a/zsh-syntax-highlighting.zsh b/zsh-syntax-highlighting.zsh index eee0284..9ffde76 100644 --- a/zsh-syntax-highlighting.zsh +++ b/zsh-syntax-highlighting.zsh @@ -55,7 +55,7 @@ fi # Use workaround for bug in ZSH? # zsh-users/zsh@48cadf4 http://www.zsh.org/mla/workers//2017/msg00034.html -autoload -U is-at-least +autoload -Uz is-at-least if is-at-least 5.4; then zsh_highlight__pat_static_bug=false else @@ -421,7 +421,7 @@ _zsh_highlight_preexec_hook() typeset -g _ZSH_HIGHLIGHT_PRIOR_BUFFER= typeset -gi _ZSH_HIGHLIGHT_PRIOR_CURSOR= } -autoload -U add-zsh-hook +autoload -Uz add-zsh-hook add-zsh-hook preexec _zsh_highlight_preexec_hook 2>/dev/null || { print -r -- >&2 'zsh-syntax-highlighting: failed loading add-zsh-hook.' }