Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion function help
- X-seq: zsh-workers 25712
- From: Oliver Kiddle <okiddle@xxxxxxxxxxx>
- To: Bismark <bismark@xxxxxxxxxx>
- Subject: Re: completion function help
- Date: Mon, 22 Sep 2008 16:39:05 +0200
- Cc: zsh-workers@xxxxxxxxxx
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.co.uk; h=Received:X-YMail-OSG:X-Yahoo-Newman-Property:Received:cc:In-reply-to:From:References:To:Subject:Date:Message-ID; b=u/WF7WyzXMiYOBrNp6YsZVs0Y+sOURAbUvXgWP6NqWlL7b+AgXkj2Q3g6CjtLTrjcGEKrnvkqYBQUNRncLCWI6dmoTQFebJXkxiFN28wqhb/TrO6SBgJk5HOb2a/9kLr6lKp5Ot0diGSp10aisDS3hOVrYoOiOp6NCKV8p/jCYQ= ;
- In-reply-to: <48D40EEB.3040404@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <48D40EEB.3040404@xxxxxxxxxx>
On 19 Sep, Bismark wrote:
> What I'm looking for is for the parameters for an option to a command to
> have a description. I've gotten the completion to work for the command
> but when I complete the option I only get the values.
> I would like it to display something like the following
>
> $ medusa -e
> Additional password checks
> n -- No Password
> s -- Username = Password
> ns -- No Password & Username = Password
I'm guessing that you've got this far by using _arguments and passing it
something like the following:
'-e[additional password checks]:check:(n s ns)' \
To add descriptions, you would use something like the following:
'-e[additional password checks]:check:((n\:No\ password s\:Username\ =\ Password ns\:No\ Password\ \&\ Username\ =\ Password))'
I'm not familiar with the medusa software so can't say for sure if this
really is the right answer. You might actually want to use _values for
the list of checks.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author