Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: rmmod/modprobe -r completion
- X-seq: zsh-workers 14362
- From: Clint Adams <clint@xxxxxxx>
- To: Oliver Kiddle <opk@xxxxxxxxxxxxx>
- Subject: Re: PATCH: rmmod/modprobe -r completion
- Date: Wed, 16 May 2001 08:32:55 -0400
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <20010516080047.A11461@xxxxxxxx>; from clint@xxxxxxx on Wed, May 16, 2001 at 08:00:47AM -0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010514222601.A18298@xxxxxxxx> <3B014622.7EE4888@xxxxxxxxxxxxx> <20010516080047.A11461@xxxxxxxx>
> Well, modprobe could benefit from the use of states, so here's
> modprobe supporting a few more options:
And here's some more.
Index: Completion/Unix/Command/_modutils
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Unix/Command/_modutils,v
retrieving revision 1.3
diff -u -r1.3 _modutils
--- Completion/Unix/Command/_modutils 2001/05/16 12:02:17 1.3
+++ Completion/Unix/Command/_modutils 2001/05/16 12:30:41
@@ -47,11 +47,25 @@
'(--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
;;
@@ -64,5 +78,10 @@
_arguments "$_modprobe_arguments[@]" \
'*: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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author