summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog2
-rwxr-xr-xCompletion/Unix/Command/_modutils21
2 files changed, 21 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 602b272b5..4287410f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,6 @@
2001-05-16 Clint Adams <clint@zsh.org>
- * 14361: Completion/Unix/Command/_modutils: use
+ * 14361, 14362: Completion/Unix/Command/_modutils: use
state for modprobe so that modprobe -r will
complete multiple loaded modules. Also
handle more of modprobe's options.
diff --git a/Completion/Unix/Command/_modutils b/Completion/Unix/Command/_modutils
index 6021f0aec..481b8b289 100755
--- a/Completion/Unix/Command/_modutils
+++ b/Completion/Unix/Command/_modutils
@@ -47,11 +47,25 @@ case "$service" in
'(--autoclean)-k[set autoclean]' \
'(-k)--autoclean' \
'(--show)-n[do not act]' \
- '(-n)--show'
+ '(-n)--show' \
+ '(--quiet)-q[do not complain about insmod failures]' \
+ '(-q)--quiet' \
+ '(--syslog)-s[report via syslog instead of stderr]' \
+ '(-s)--syslog' \
+ '(--type)-t[module type]:moduletype:' \
+ '(-t)--type:moduletype:' \
+ '(--verbose)-v[print all commands as executed]' \
+ '(-v)--verbose' \
+ '(--version)-V[show release version]' \
+ '(-V)--version' \
+ '(--config)-C[config file]:config file:_files' \
+ '(-C)--config:config file:_files'
)
_arguments '(--remove)-r[remove]:*:loaded module:->modprobe_remove' \
'(-r)--remove:*:loaded module:->modprobe_remove' \
+ '(--list)-l[list matching modules]:*:module file:->modprobe_list' \
+ '(-l)--list:*:module file:->modprobe_list' \
"$_modprobe_arguments[@]" && return 0
;;
@@ -65,4 +79,9 @@ case "$state" in
'*:loaded module:_modutils_loaded_modules'
;;
+ modprobe_list)
+ _call_function ret _modutils_$state && return ret
+ _arguments "$_modprobe_arguments[@]" \
+ '*:module file:compadd ${^${(M)${(f)"$(modprobe -c)"}:#path*}#*[=]}/**/*.o(:t)'
+
esac