blob: a23fd9025f7516a18df2df5b2fbc38c7e799144c (
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'
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
return ret
|