about summary refs log tree commit diff
path: root/Completion/Builtins/_zmodload
blob: 9bac1484ee3fd69958fdd24d497219003467d01f (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 - $(zmodload)
else
  _description expl 'module file'
  compadd - ${^module_path}/*(N:t:r)
fi