From a99f96797f5fc424554a94313dfc0d4a5b0923a1 Mon Sep 17 00:00:00 2001 From: Bart Schaefer Date: Sat, 4 Jun 2022 14:19:42 -0700 Subject: 50323: create helper for shadowing builtins or existing functions and use it when redefining compadd et al. --- Functions/Zle/keeper | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Functions/Zle') diff --git a/Functions/Zle/keeper b/Functions/Zle/keeper index a40125771..1570eb94a 100644 --- a/Functions/Zle/keeper +++ b/Functions/Zle/keeper @@ -73,6 +73,7 @@ zstyle ':completion:expand-kept-result:*' completer _insert_kept _expand_word_and_keep() { { + _shadow compadd function compadd { local -A args zparseopts -E -A args J: @@ -85,7 +86,7 @@ _expand_word_and_keep() { } _expand_word } always { - unfunction compadd + _unshadow compadd } } -- cgit 1.4.1