about summary refs log tree commit diff
path: root/Completion/Builtins/_zmodload
blob: 4291285175807d128e5e7261cfb0b764e94cc293 (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}/*.s[ol](N:t:r)
fi