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

local fl="$words[2]"

if [[ "$fl" = -*(a*u|u*a)* || "$fl" = -*a* && CURRENT -ge 4 ]]; then
  compgen -B
elif [[ "$fl" = -*u* ]]; then
  compadd - $(zmodload)
else
  compadd - ${^module_path}/*(N:t:r)
fi