about summary refs log tree commit diff
path: root/Completion/Builtins/_compdef
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-15 12:01:46 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-15 12:01:46 +0000
commit35b2633ad941966f5fca07b625a594a5b68c0fdb (patch)
treeb54740d014e594ba5d81931cdcdb3387bcf9dfca /Completion/Builtins/_compdef
parentbb98460a01ce1f6c1e71f7e401f782c81b71486b (diff)
downloadzsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.gz
zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.tar.xz
zsh-35b2633ad941966f5fca07b625a594a5b68c0fdb.zip
manual/8639
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