diff options
Diffstat (limited to 'Completion/Builtins/_unhash')
-rw-r--r-- | Completion/Builtins/_unhash | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Completion/Builtins/_unhash b/Completion/Builtins/_unhash index eb1787936..dfebd5399 100644 --- a/Completion/Builtins/_unhash +++ b/Completion/Builtins/_unhash @@ -4,19 +4,18 @@ local fl="$words[2]" ret=1 expl if [[ "$fl" = -*d* ]]; then _description expl 'named directory' - compgen "$expl[@]" -n && ret=0 + compadd "$expl[@]" - "${(@k)nameddirs}" && ret=0 fi if [[ "$fl" = -*a* ]]; then _description expl alias - compgen "$expl[@]" -a && ret=0 + compadd "$expl[@]" - "${(@k)aliases}" && ret=0 fi if [[ "$fl" = -*f* ]]; then _description expl 'shell function' - compgen "$expl[@]" -F && ret=0 + compadd "$expl[@]" - "${(@k)functions}" && ret=0 fi if [[ "$fl" != -* ]]; then - _description expl command - compgen "$expl[@]" -m && ret=0 + _command_names -e && ret=0 fi return ret |