about summary refs log tree commit diff
path: root/Completion/Builtins/_disable
blob: fe6b991b274ca4806303eb183fb5f3d7752dbd34 (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 disable

local prev="$words[CURRENT-1]" ret=1 expl

if [[ "$prev" = -*a* ]]; then
  _description expl alias
  compadd "$expl[@]" "$@" - "${(k@)aliases[(R)^?disabled*]}" && ret=0
fi
if [[ "$prev" = -*f* ]]; then
  _description expl 'shell function'
  compadd "$expl[@]" "$@" - "${(k@)functions[(R)^?disabled*]}" && ret=0
fi
if [[ "$prev" = -*r* ]]; then
  _description expl 'reserved word'
  compadd "$expl[@]" "$@" - "${(k@)reswords[(R)^?disabled*]}" && ret=0
fi
if [[ "$prev" != -* ]]; then
  _description expl 'builtin command'
  compadd "$expl[@]" "$@" - "${(k@)builtins[(R)^?disabled*]}" && ret=0
fi

return ret