about summary refs log tree commit diff
path: root/Completion/Builtins/_which
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-12 15:28:24 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-12 15:28:24 +0000
commite6282df1155e8d9b08b2e518a452c1997973f1ce (patch)
treeb0c8ed7e8512cc4397ae7df6d138ea66147565b3 /Completion/Builtins/_which
parent167b0ae3b98938f75287dcf2e112d41a03532c5f (diff)
downloadzsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.gz
zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.xz
zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.zip
manual/8630
Diffstat (limited to 'Completion/Builtins/_which')
-rw-r--r--Completion/Builtins/_which20
1 files changed, 9 insertions, 11 deletions
diff --git a/Completion/Builtins/_which b/Completion/Builtins/_which
index 41e7d20fd..6e9e0a460 100644
--- a/Completion/Builtins/_which
+++ b/Completion/Builtins/_which
@@ -1,14 +1,12 @@
 #compdef which whence where type
 
-local expl
+local args
 
-_description expl 'external command'
-compadd "$expl[@]" "$@" - "${(k@)commands}" && ret=0
-_description expl 'builtin command'
-compadd "$expl[@]" "$@" - "${(k@)builtins}" && ret=0
-_description expl 'shell function'
-compadd "$expl[@]" "$@" - "${(k@)functions}" && ret=0
-_description expl 'alias'
-compadd "$expl[@]" "$@" - "${(k@)aliases}" && ret=0
-_description expl 'reserved word'
-compadd "$expl[@]" "$@" - "${(k@)reswords}" && ret=0
+args=( "$@" )
+
+_alternative -O args any:argument \
+  'commands:external command:compadd - ${(k@)commands}' \
+  'builtins:builtin command:compadd - ${(k@)builtins}' \
+  'functions:shell function:compadd - ${(k@)functions}' \
+  'aliases:alias:compadd - ${(k@)aliases}' \
+  'reserved-words:reserved word:compadd - ${(k@)reswords}'