about summary refs log tree commit diff
path: root/Functions
diff options
context:
space:
mode:
authorBart Schaefer <schaefer@zsh.org>2022-06-04 14:19:42 -0700
committerBart Schaefer <schaefer@zsh.org>2022-06-04 14:19:42 -0700
commita99f96797f5fc424554a94313dfc0d4a5b0923a1 (patch)
tree5cb7d78e59fb24c5ae8ab5f2c1579da279df73b8 /Functions
parent3e3cfabcc74dc79d4d8717c4e5859d8d01be6c54 (diff)
downloadzsh-a99f96797f5fc424554a94313dfc0d4a5b0923a1.tar.gz
zsh-a99f96797f5fc424554a94313dfc0d4a5b0923a1.tar.xz
zsh-a99f96797f5fc424554a94313dfc0d4a5b0923a1.zip
50323: create helper for shadowing builtins or existing functions and use it when redefining compadd et al.
Diffstat (limited to 'Functions')
-rw-r--r--Functions/Zle/keeper3
1 files changed, 2 insertions, 1 deletions
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
     }
 }