Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: completion function help



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