diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-12 15:28:24 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-11-12 15:28:24 +0000 |
commit | e6282df1155e8d9b08b2e518a452c1997973f1ce (patch) | |
tree | b0c8ed7e8512cc4397ae7df6d138ea66147565b3 /Completion/Builtins/_unhash | |
parent | 167b0ae3b98938f75287dcf2e112d41a03532c5f (diff) | |
download | zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.gz zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.xz zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.zip |
manual/8630
Diffstat (limited to 'Completion/Builtins/_unhash')
-rw-r--r-- | Completion/Builtins/_unhash | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/Completion/Builtins/_unhash b/Completion/Builtins/_unhash index a23fd9025..6ccbc21a4 100644 --- a/Completion/Builtins/_unhash +++ b/Completion/Builtins/_unhash @@ -1,22 +1,14 @@ #compdef unhash -local fl="$words[2]" ret=1 expl +local fl="$words[2]" args -if [[ "$fl" = -*d* ]]; then - _description expl 'named directory' - compadd "$expl[@]" - "${(@k)nameddirs}" && ret=0 -fi -if [[ "$fl" = -*a* ]]; then - _description expl alias - compadd "$expl[@]" - "${(@k)aliases}" "${(@k)dis_aliases}" \ - "${(@k)galiases}" "${(@k)dis_galiases}" && ret=0 -fi -if [[ "$fl" = -*f* ]]; then - _description expl 'shell function' - compadd "$expl[@]" - "${(@k)functions}" "${(@k)dis_functions}" && ret=0 -fi -if [[ "$fl" != -* ]]; then - _command_names -e && ret=0 -fi +args=() +[[ "$fl" = -*d* ]] && + args=( 'named-directories:named directory:compadd - ${(@k)nameddirs}' ) +[[ "$fl" = -*a* ]] && + args=( "$args[@]" + 'aliases:alias:compadd - ${(@k)aliases} ${(@k)galiases} ${(@k)dis-aliases} ${(@k)dis-galiases}' ) +[[ "$fl != -* ]] && + args=( 'commands:: _command_names -e' ) -return ret +_alternative any:argument "$args[@]" |