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

local expl state line curcontext="$curcontext"

_arguments -C -s -S \
  '(-a -f -s *)-d[remove named directories]:*:named directory:->nameddir' \
  '(-d -f -s *)-a[remove aliases]:*:alias:_aliases' \
  '(-a -d -f *)-s[remove suffix aliases]:*:suffix alias:_aliases -s s' \
  '(-d -a -s *)-f[remove functions]:*:function:_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