Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Completion listing of command options ( Re: Size of select listing?)
- X-seq: zsh-workers 7788
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: Completion listing of command options ( Re: Size of select listing?)
- Date: Mon, 13 Sep 1999 10:34:24 +0200 (MET DST)
- In-reply-to: "Andrej Borsenkow"'s message of Fri, 10 Sep 1999 19:54:47 +0400
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Andrej Borsenkow wrote:
> You can set option_prefix configuration key. In this case, options will be
> generated only if anything else fails. This reduces list to "normal arguments"
> completion.
>
> Still, I'd like to add handling of `--' as option terminator as well. We need
> some way (option?) to tell _arguments, that `--' ends option list for this
> command, so, that after `--' it won't try to complete command options any more.
_arguments '--:*:all arguments after this one:<action>'
will make everything after a `--' be completed by `<action>'. RTM.
> You can make options and arguments be displayed in separate groups. It adds to
> readability but does not make list size smaller.
How should it.
> About `-' display - it is currently needed to distinguish between option(s) and
> argument(s). If you can make sure, that only options or only arguments are
> displayed - it could be omitted.
Why would you want it, I wonder. It's only a couple of characters
after all and only very seldom will the omission of the `-'s make the
list small enough to fit on the terminal if it didn't fit with the `-'s.
> But, if you make a patch, do make it to use a configuration key :-)
*Definitely*, yes.
> Still, _arguments, even with option_prefix set, behaves funnily:
>
> patch TAB -> completes files. It's O.K.
> patch foo TAB -> again files. Still O.K.
> patch foo bar TAB - lists all options! But, patch can have only two arguments -
> so, I'd expected some message about it.
The fact that you only get options as possible matches even though you
normally don't see them could be taken as a (strong) hint for that,
couldn't it? However, it wouldn't be hard to add either `:no more arguments:'
descriptions to the calls of `_arguments' or build this into
`_arguments'.
Bye
Sven
P.S.: Btw, _long_options is dead.
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author