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

local fl="$words[2]" expl

if [[ "$fl" = -*(a*u|u*a)* || "$fl" = -*a* && CURRENT -ge 4 ]]; then
  _description expl 'builtin command'
  compadd "$expl[@]" "$@" - "${(k@)builtins}" && ret=0
elif [[ "$fl" = -*u* ]]; then
  _description expl module
  compadd "$expl[@]" - "${(@k)modules}"
else
  _description expl 'module file'
  compadd "$expl[@]" - ${^module_path}/*.s[ol](N:t:r)
fi