diff options
author | Oliver Kiddle <opk@zsh.org> | 2016-07-28 16:12:59 +0200 |
---|---|---|
committer | Oliver Kiddle <opk@zsh.org> | 2016-07-28 16:12:59 +0200 |
commit | 54d5f8e3632ca3698d90662d49d1320f91827078 (patch) | |
tree | ec6b15890fc84d277c9964a7395d940860d920bc /Completion/Zsh/Command/_zle | |
parent | 7830a8c498730cd08dad27d4d6ec9722f9cd637a (diff) | |
download | zsh-54d5f8e3632ca3698d90662d49d1320f91827078.tar.gz zsh-54d5f8e3632ca3698d90662d49d1320f91827078.tar.xz zsh-54d5f8e3632ca3698d90662d49d1320f91827078.zip |
38956: factor out zle widget completion into its own function
Diffstat (limited to 'Completion/Zsh/Command/_zle')
-rw-r--r-- | Completion/Zsh/Command/_zle | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Completion/Zsh/Command/_zle b/Completion/Zsh/Command/_zle index 3ed373348..f189b8fd9 100644 --- a/Completion/Zsh/Command/_zle +++ b/Completion/Zsh/Command/_zle @@ -48,20 +48,20 @@ case "$state[1]" in '(-)*:widget arguments: ' && ret=0 ;; (widget*) - _wanted -C "$context[1]" widgets expl "${state_descr[1]:-widget}" compadd -k widgets && ret=0 + _wanted -C "$context[1]" widgets expl "${state_descr[1]:-widget}" _widgets && ret=0 ;& (function) [[ $state[1] != *function ]] || # Handle fall-through _wanted -C "$context[1]" functions expl 'widget shell function' \ - compadd -k functions && ret=0 + compadd -M 'r:|-=* r:|=*' -k functions && ret=0 ;; (comp-widget) _wanted -C "$context[1]" widgets expl 'completion widget' \ - compadd -k "widgets[(R)(*:|)(.|)(${(j(|))compwids})(|:*)]" && ret=0 + _widgets -g "(*:|)(.|)(${(j(|))compwids})(|:*)" && ret=0 ;& (builtin-comp-widget) _wanted -C "$context[1]" widgets expl 'builtin completion widget' \ - compadd -k "widgets[(I)(.|)(${(j(|))compwids})]" && ret=0 + compadd -M 'r:|-=* r:|=*' -k "widgets[(I)(.|)(${(j(|))compwids})]" && ret=0 ;; (redisplay) _arguments -s -S '!-R' \ |