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

local fl="$words[2]"

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