diff options
Diffstat (limited to 'Completion/Zsh/Function')
-rw-r--r-- | Completion/Zsh/Function/_add-zle-hook-widget | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Completion/Zsh/Function/_add-zle-hook-widget b/Completion/Zsh/Function/_add-zle-hook-widget index da65dd6e9..93954a2bb 100644 --- a/Completion/Zsh/Function/_add-zle-hook-widget +++ b/Completion/Zsh/Function/_add-zle-hook-widget @@ -4,7 +4,7 @@ _add-zle-hook-widget_types() { local -a tmp autoload -U add-zle-hook-widget - add-zle-hook-widget -h > /dev/null # sets the zstyle + add-zle-hook-widget -h >&/dev/null # sets the zstyle zstyle -g tmp zle-hook types compadd "$@" -M 'L:|=zle-' -M 'r:|-=* r:|=*' -- zle-${^tmp} @@ -16,8 +16,7 @@ _add-zle-hook-widget_widgets() { zstyle -g tmp $line[1] widgets _wanted widgets expl "installed hook" compadd -- ${tmp#<->:} && return 0 else - local -a user_widgets=( ${(k)widgets[(R)user:*]} ) - _wanted widgets expl widget compadd -M 'r:|-=* r:|=*' -a user_widgets && return 0 + _wanted widgets expl widget _widgets -g 'user:*' && return 0 fi return 1 } |