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

local expl state line curcontext="$curcontext"

_arguments -C -s -S \
  '(-a -f *)-d[remove named directories]:*:named directory:->nameddir' \
  '(-d -f *)-a[remove aliases]:*:aliases:_aliases' \
  '(-d -a *)-f[remove functions]:*:functions:_functions' \
  '-m[treat arguments as patterns]' \
  '(-a -d -f -m)*:command: _command_names -e' && return 0

[[ "$state" = nameddir ]] &&
  _wanted named-directories expl 'named directory' compadd -k nameddirs