about summary refs log tree commit diff
path: root/Completion/Builtins/_unhash
blob: 51fef064a696c412cd54570ffa669876edc1f676 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
#compdef unhash

local fl="$words[2]" args

args=()
[[ "$fl" = -*d* ]] &&
    args=( 'named-directories:named directory:compadd - ${(@k)nameddirs}' )
[[ "$fl" = -*a* ]] &&
    args=( "$args[@]"
           'aliases:alias:compadd - ${(@k)aliases} ${(@k)galiases} ${(@k)dis-aliases} ${(@k)dis-galiases}' )
[[ "$fl" != -* ]] &&
    args=( 'commands:: _command_names -e' )

_alternative "$args[@]"