blob: dfebd5399f7c4a364c6531b611e59965dddc263f (
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}" && ret=0
fi
if [[ "$fl" = -*f* ]]; then
_description expl 'shell function'
compadd "$expl[@]" - "${(@k)functions}" && ret=0
fi
if [[ "$fl" != -* ]]; then
_command_names -e && ret=0
fi
return ret
|