diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-22 16:31:42 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-22 16:31:42 +0200 |
commit | 9599d45c3c8ae5bc6b2780cd2013db4daed3c242 (patch) | |
tree | e4c2c9f7ffde94b432356a99f3297146cbe10350 /etc | |
parent | 47623f4d35a9fb494de408965b1fb1b5321edd07 (diff) |
Prepare _modprobe for proper -r support
Diffstat (limited to 'etc')
-rw-r--r-- | etc/completions/_modprobe | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/etc/completions/_modprobe b/etc/completions/_modprobe index cc6bdfe..d55d739 100644 --- a/etc/completions/_modprobe +++ b/etc/completions/_modprobe @@ -53,7 +53,7 @@ arguments=( '--force-vermagic[Ignore version magic when loading modules]' '--force-modversion[Ignore CONFIG_MODVERSION when loading modules]' '--show-depends[List dependencies of a module]' - '*:module:_modprobe_module' + '*:module:_modprobe_all_modules' ) for arg in ${(k)argument_pairs}; { @@ -61,10 +61,16 @@ for arg in ${(k)argument_pairs}; { arguments+='(-'${argument_pairs[$arg]}[1]')--'${arg}${argument_postfix[$arg]} } -function _modprobe_module { +function _modprobe_all_modules { typeset expl _wanted module expl module \ compadd ${$(echo /lib/modules/$(uname -r)/**/*.ko):t:r} } +function _modprobe_loaded_modules { + typeset expl + _wanted module expl module \ + compadd $(cut -d\ -f1 < /proc/modules) +} + _arguments -s ${arguments} |