blob: 1209f68af19e8acd0b9e741796a68c4425c0cf17 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#compdef unhash
local fl="$words[2]" ret=1 expl
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)disaliases}" && ret=0
fi
if [[ "$fl" = -*f* ]]; then
_description expl 'shell function'
compadd "$expl[@]" - "${(@k)functions}" "${(@k)disfunctions}" && ret=0
fi
if [[ "$fl" != -* ]]; then
_command_names -e && ret=0
fi
return ret
|