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

local fl="$words[2]" expl

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