From 9867c4091e71e6ed69889a9bfaee07275d2fa04e Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 19 Aug 1999 11:18:05 +0000 Subject: manual/7448 --- Completion/Builtins/_unhash | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) (limited to 'Completion/Builtins/_unhash') diff --git a/Completion/Builtins/_unhash b/Completion/Builtins/_unhash index 825c130b2..eb1787936 100644 --- a/Completion/Builtins/_unhash +++ b/Completion/Builtins/_unhash @@ -1,10 +1,22 @@ #compdef unhash -local fl="$words[2]" ret=1 +local fl="$words[2]" ret=1 expl -[[ "$fl" = -*d* ]] && compgen -n && ret=0 -[[ "$fl" = -*a* ]] && compgen -a && ret=0 -[[ "$fl" = -*f* ]] && compgen -F && ret=0 -[[ "$fl" != -* ]] && compgen -m && ret=0 +if [[ "$fl" = -*d* ]]; then + _description expl 'named directory' + compgen "$expl[@]" -n && ret=0 +fi +if [[ "$fl" = -*a* ]]; then + _description expl alias + compgen "$expl[@]" -a && ret=0 +fi +if [[ "$fl" = -*f* ]]; then + _description expl 'shell function' + compgen "$expl[@]" -F && ret=0 +fi +if [[ "$fl" != -* ]]; then + _description expl command + compgen "$expl[@]" -m && ret=0 +fi return ret -- cgit 1.4.1