blob: eb178793664f0c50ecf239c2ee5a4dfc76948a17 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#compdef unhash
local fl="$words[2]" ret=1 expl
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
|