mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
14361: better modprobe completion
This commit is contained in:
parent
8e20d1da63
commit
96ca999e73
@ -1,3 +1,10 @@
|
||||
2001-05-16 Clint Adams <clint@zsh.org>
|
||||
|
||||
* 14361: Completion/Unix/Command/_modutils: use
|
||||
state for modprobe so that modprobe -r will
|
||||
complete multiple loaded modules. Also
|
||||
handle more of modprobe's options.
|
||||
|
||||
2001-05-16 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 14359: Src/Zle/zle_tricky.c: more fixage for expansion: just
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user