diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-31 09:38:25 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-05-31 09:38:25 +0000 |
commit | fd25b24df6b4f098944c4994195d3894a27a8208 (patch) | |
tree | 53f7f940844ab34c7349506622fc8241c782f98c /Completion/Builtins/_zmodload | |
parent | 4629133ad33dacef459ad9fa5ca438836a1be9fb (diff) | |
download | zsh-fd25b24df6b4f098944c4994195d3894a27a8208.tar.gz zsh-fd25b24df6b4f098944c4994195d3894a27a8208.tar.xz zsh-fd25b24df6b4f098944c4994195d3894a27a8208.zip |
use compadd -[ak] (11549)
Diffstat (limited to 'Completion/Builtins/_zmodload')
-rw-r--r-- | Completion/Builtins/_zmodload | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/Completion/Builtins/_zmodload b/Completion/Builtins/_zmodload index 112acb57c..5ca167152 100644 --- a/Completion/Builtins/_zmodload +++ b/Completion/Builtins/_zmodload @@ -1,9 +1,11 @@ -#defcomp zmodload +#compdef zmodload -if [[ -mword 1 -*(a*u|u*a)* || -mword 1 -*a* && -position 3 -1 ]]; then - complist -B -elif [[ -mword 1 -*u* ]]; then - complist -s '$(zmodload)' +local fl="$words[2]" expl + +if [[ "$fl" = -*(a*u|u*a)* || "$fl" = -*a* && CURRENT -ge 4 ]]; then + _wanted builtins expl 'builtin command' compadd "$@" -k builtins +elif [[ "$fl" = -*u* ]]; then + _wanted modules expl module compadd -k modules else - complist -s '${^module_path}/*(N:t:r)' + _wanted files expl 'module file' _files -W module_path -/g '*.s[ol](:r)' fi |