From 96ca999e739ad8aeb2581e8b82a9e4a54a766daa Mon Sep 17 00:00:00 2001 From: Clint Adams Date: Wed, 16 May 2001 12:02:17 +0000 Subject: 14361: better modprobe completion --- Completion/Unix/Command/_modutils | 31 ++++++++++++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) (limited to 'Completion/Unix') diff --git a/Completion/Unix/Command/_modutils b/Completion/Unix/Command/_modutils index 1a725e511..6021f0aec 100755 --- a/Completion/Unix/Command/_modutils +++ b/Completion/Unix/Command/_modutils @@ -32,12 +32,37 @@ case "$service" in '(-v)--verbose' \ '(--version)-V[print version]' \ '(-V)--version' \ - '*:loaded module:_modutils_loaded_modules' + '*:loaded module:_modutils_loaded_modules' && return 0 ;; modprobe) - _arguments '(--remove)-r[remove]:loaded module:_modutils_loaded_modules' \ - '(-r)--remove:loaded module:_modutils_loaded_modules' + + _modprobe_arguments=( + '(--all)-a[all]' \ + '(-a)--all' \ + '(--showconfig)-c[showconfig]' \ + '(-c)--showconfig' \ + '(--debug)-d[debug]' \ + '(-d)--debug' \ + '(--autoclean)-k[set autoclean]' \ + '(-k)--autoclean' \ + '(--show)-n[do not act]' \ + '(-n)--show' + ) + + _arguments '(--remove)-r[remove]:*:loaded module:->modprobe_remove' \ + '(-r)--remove:*:loaded module:->modprobe_remove' \ + "$_modprobe_arguments[@]" && return 0 + + ;; + +esac + +case "$state" in + modprobe_remove) + _call_function ret _modutils_$state && return ret + _arguments "$_modprobe_arguments[@]" \ + '*:loaded module:_modutils_loaded_modules' ;; esac -- cgit 1.4.1