summaryrefslogtreecommitdiff
path: root/Completion/Zsh/Command
diff options
context:
space:
mode:
authorAxel Beckert <abe@deuxchevaux.org>2018-09-11 00:41:19 +0200
committerAxel Beckert <abe@deuxchevaux.org>2018-09-11 00:41:19 +0200
commitb531f38d5c75078478f2eaa0b714cc08afa6fce2 (patch)
treec31812913cefe3b80b8c4abcbfa05516091c1628 /Completion/Zsh/Command
parenta04e81b62565a21b0c613115e57f983e7c56d35e (diff)
parentb3239c5e40eea0a73992160c5619b7d191ede490 (diff)
downloadzsh-b531f38d5c75078478f2eaa0b714cc08afa6fce2.tar.gz
zsh-b531f38d5c75078478f2eaa0b714cc08afa6fce2.zip
Merge tag 'zsh-5.6.1' into debian
Patch release: 5.6.1
Diffstat (limited to 'Completion/Zsh/Command')
-rw-r--r--Completion/Zsh/Command/_compdef5
1 files changed, 3 insertions, 2 deletions
diff --git a/Completion/Zsh/Command/_compdef b/Completion/Zsh/Command/_compdef
index 7a64da835..22af7f561 100644
--- a/Completion/Zsh/Command/_compdef
+++ b/Completion/Zsh/Command/_compdef
@@ -1,6 +1,6 @@
#compdef compdef
-local state line expl list disp curcontext="$curcontext" pat normal ret=1
+local state line expl disp curcontext="$curcontext" pat normal ret=1
local args1 args2
typeset -A opt_args
@@ -57,7 +57,8 @@ case $state in
_wanted commands expl 'completed command' compadd -k _comps && ret=0
;;
cfun)
- list=( ${^fpath:/.}/_(|*[^~])(:t) )
+ typeset -aU list=( ${(v)_comps} ${(k)functions[(I)_*]} )
+ (( ${+list[1]} )) || list+=( ${^fpath:/.}/_(|*[^~])(:t) )
if zstyle -T ":completion:${curcontext}:functions" prefix-hidden; then
disp=( ${list[@]#_} )
_wanted functions expl 'completion function' \