diff options
author | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-23 11:53:13 +0200 |
---|---|---|
committer | Daniel Friesel <derf@derf.homelinux.org> | 2010-06-23 11:53:13 +0200 |
commit | 3ae614b7c3f446179c486a4874c02574148bbe43 (patch) | |
tree | c806ebfe2820d8570a9ecff2b15de85deaf0c9af /etc/completions/_modprobe | |
parent | 035af3d7aded616e4b87a77985c8b9161b14436a (diff) |
_modprobe: (sort of) fix -a handling
Diffstat (limited to 'etc/completions/_modprobe')
-rw-r--r-- | etc/completions/_modprobe | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/etc/completions/_modprobe b/etc/completions/_modprobe index 629d1dd..4e9e6ed 100644 --- a/etc/completions/_modprobe +++ b/etc/completions/_modprobe @@ -53,7 +53,8 @@ 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_module' + '*:module name or argument:_modprobe_module_or_arg' ) for arg in ${(k)argument_pairs}; { @@ -73,12 +74,24 @@ function _modprobe_loaded_modules { compadd $(cut -d\ -f1 < /proc/modules) } +function _modprobe_module_args { + _message 'module arguments' +} + function _modprobe_module { - if [[ ${words[(I)-r]} == 0 ]] { + if [[ ${words[(I)(-r|--remove)]} == 0 ]] { _modprobe_all_modules } else { _modprobe_loaded_modules } } +function _modprobe_module_or_arg { + if [[ ${words[(I)(-a|--all)]} == 0 ]] { + _modprobe_module_args + } else { + _modprobe_module + } +} + _arguments -s ${arguments} |