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/_compdef12
1 files changed, 4 insertions, 8 deletions
diff --git a/Completion/Builtins/_compdef b/Completion/Builtins/_compdef
index df25d44de..7b4b0cb35 100644
--- a/Completion/Builtins/_compdef
+++ b/Completion/Builtins/_compdef
@@ -12,16 +12,12 @@ while [[ $words[base] = -* ]]; do
 done
 
 if [ "$delete" ]; then
-  _tags any:argument commands || return 1
-
-  _description expl 'completed command'
-  compadd "$expl[@]" - ${(k)_comps}
+  _wanted commands expl 'completed command' &&
+      compadd "$expl[@]" - ${(k)_comps}
 else
   if [[ CURRENT -eq base ]]; then
-    _tags any:argument functions || return 1
-
-    _description expl 'completion function'
-    compadd "$expl[@]" - ${^fpath:/.}/_(|*[^~])(N:t)
+    _wanted functions expl 'completion function' &&
+        compadd "$expl[@]" - ${^fpath:/.}/_(|*[^~])(N:t)
   else
     _command_names
   fi