* [PATCH] Use modinfo to complete module parameter
@ 2008-08-31 19:56 Jörg Sommer
0 siblings, 0 replies; only message in thread
From: Jörg Sommer @ 2008-08-31 19:56 UTC (permalink / raw)
To: zsh-workers
Hi,
I would like to have zsh completes the parameter of a kernel module at
modprobe. I'm not very familiar with zsh completion, but maybe someone
can beautify it:
diff --git a/Completion/Linux/Command/_modutils b/Completion/Linux/Command/_modutils
index cc7034f..7322903 100644
--- a/Completion/Linux/Command/_modutils
+++ b/Completion/Linux/Command/_modutils
@@ -85,7 +85,8 @@ case "$state" in
if compset -P '*='; then
_message -e value 'parameter value'
else
- _message -e parameter 'module parameter'
+ _values 'module parameter' \
+ ${(f)^"$(_call_program module_parameter modinfo -F parm "$words[2]" 2>/dev/null)"//:/\=[}\]
fi
;;
esac
Bye, Jörg.
--
Wer einen Traum verwirklichen will, muss erst aufwachen.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-31 20:07 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-31 19:56 [PATCH] Use modinfo to complete module parameter Jörg Sommer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).