about summary refs log tree commit diff
path: root/Completion/Builtins/_zmodload
blob: a4f13c0ed05dbd77bb4c6e1686e4c1ed02954e6b (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'
  compgen "$expl[@]" -B
elif [[ "$fl" = -*u* ]]; then
  _description expl module
  compadd "$expl[@]" - $(zmodload)
else
  _description expl 'module file'
  compadd "$expl[@]" - ${^module_path}/*(N:t:r)
fi