blob: 1a1097a7aeae2501cbe879105e994140df5ce24e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
#compdef zmodload
local fl="$words[2]" expl
if [[ "$fl" = -*(a*u|u*a)* || "$fl" = -*a* && CURRENT -ge 4 ]]; then
_tags any:argument builtins || return 1
_description expl 'builtin command'
compadd "$expl[@]" "$@" - "${(k@)builtins}" && ret=0
elif [[ "$fl" = -*u* ]]; then
_tags any:argument modules || return 1
_description expl module
compadd "$expl[@]" - "${(@k)modules}"
else
_tags any:argument files || return 1
_description expl 'module file'
compadd "$expl[@]" - ${^module_path}/*.s[ol](N:t:r)
fi
|