about summary refs log tree commit diff
path: root/Completion/Builtins/_zmodload
blob: a0d5987c474d328e18a06b5276e14a915b10d696 (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'
  compadd "$expl[@]" "$@" - "${(k@)builtins[(R)^?disabled*]}" && ret=0
elif [[ "$fl" = -*u* ]]; then
  _description expl module
  compadd "$expl[@]" - "${(@k)modules}"
else
  _description expl 'module file'
  compadd "$expl[@]" - ${^module_path}/*.s[ol](N:t:r)
fi