about summary refs log tree commit diff
path: root/Completion/Builtins/_zcompile
blob: af2b2553eeee9744cd2530b68ee68b03df002eda (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#compdef zcompile

local context state line expl
typeset -A opt_args

_arguments -s \
    '(-t -c -m -a)-U[don'\''t expand aliases]' \
    '(-t -M)-R[mark as read]' \
    '(-t -R)-M[mark as mapped]' \
    '(-t -c -z -m -a)-k[ksh-style autoloading]' \
    '(-t -c -k -m -a)-z[zsh-style autoloading]' \
    '(-t -U -z -k)-c[currently defined functions]' \
    '(-t -U -z -k)-m[use names as patterns]' \
    '(-t -U -z -k)-a[write autoload functions]' \
    '(-M -R -U -z -k -a -c -m)-t[show table of contents]' \
    ':zwc file:_files' \
    '*:function:->function' && return 0

if (( $+opt_args[-c] )); then
  _wanted functions expl 'function to write' compadd - ${(k)functions}
else
  _description files expl 'zsh source file'
  _files "$expl[@]"
fi