Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[PATCH] Use modinfo to complete module parameter
- X-seq: zsh-workers 25572
- From: Jörg Sommer <joerg@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: [PATCH] Use modinfo to complete module parameter
- Date: Sun, 31 Aug 2008 19:56:35 +0000 (UTC)
- Dkim-signature: v=1; a=rsa-sha256; c=simple/simple; d=gnuu.de; s=banki; t=1220213238; i=@xxxxxxxxxxxx; bh=6a5HsZrtBaDY+1I3Jgbp9EZRoQ2QNtEkU 0YJ28miZfY=; h=To:From:Subject:Date:Message-ID:Mime-Version: Content-Type:Content-Transfer-Encoding:Sender; b=Bt98dF17H2VFtnTm0 3qnD0jtPJn6YPsIsDbnsc2yabrVFZGX9JOaoxARDiowWP1XgBHdNC/Dj1ksuBVp3lRA EjydwOiUjunIYnQEzXMFReiBPTjboVqZYMHXg791NBq2m1y3YTYhTMWliwCssOwjSa3 WNjzYJffOm9z8yNFNp1A=
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Sender: news <news@xxxxxxxxxxxx>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author