mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-05 11:01:13 +02:00
14362: more modprobe stuff
This commit is contained in:
parent
96ca999e73
commit
f41bff3ba1
2 changed files with 21 additions and 2 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue