about summary refs log tree commit diff
path: root/Completion/Builtins/_zmodload
blob: c167df445e00a6d03b0c24ebc66a25e9d843dfd1 (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' &&
      _files "$expl[@]" -W module_path -/g '*.s[ol](:r)'
fi