about summary refs log tree commit diff
path: root/Completion/Builtins/_compdef
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Builtins/_compdef')
-rw-r--r--Completion/Builtins/_compdef20
1 files changed, 10 insertions, 10 deletions
diff --git a/Completion/Builtins/_compdef b/Completion/Builtins/_compdef
index 772c6b90d..13711e865 100644
--- a/Completion/Builtins/_compdef
+++ b/Completion/Builtins/_compdef
@@ -16,24 +16,24 @@ _arguments -C -s \
 
 case $state in
   ccom)
-    _wanted commands expl 'completed command' &&
-        compadd "$expl[@]" - ${(k)_comps}
+    _wanted commands expl 'completed command' compadd - ${(k)_comps}
   ;;
   cfun)
-    if _wanted functions expl 'completion function'; then
+    if _wanted functions; then
       list=( ${^fpath:/.}/_(|*[^~])(N:t) )
-      if zstyle -T ":completion:${curcontext}" prefix-hidden; then
+      if zstyle -T ":completion:${curcontext}:functions" prefix-hidden; then
         disp=( ${list[@]#_} )
-        compadd "$expl[@]" -d disp - "$list[@]"
+        _loop functions expl 'completion function' compadd -d disp - "$list[@]"
       else
-        compadd "$expl[@]" - "$list[@]"
+        _loop functions expl 'completion function' compadd - "$list[@]"
       fi
     fi
   ;;
   style)
-    _wanted widgetstyle expl 'widget style' &&
-        compadd complete-word delete-char-or-list expand-or-complete \
-        expand-or-complete-prefix list-choices menu-complete \
-        menu-expand-or-complete reverse-menu-complete
+    _wanted widgetstyle expl 'widget style' \
+        compadd -M 'r:|-=* r:|=*' \
+            complete-word delete-char-or-list expand-or-complete \
+            expand-or-complete-prefix list-choices menu-complete \
+            menu-expand-or-complete reverse-menu-complete
   ;;
 esac