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

Completion listing of command options ( Re: Size of select listing?)



Yes, starting to experiment with _arguments, I discovered the same problem.

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.

You can make options and arguments be displayed in separate groups. It adds to
readability but does not make list size smaller.

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.

But, if you make a patch, do make it to use a configuration key  :-)

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.

/andrej

>
> It doesn't so much relate to handling the screen size but, one area
> which I really don't like about the way _arguments and _long_options
> work is the way options are considered possible matches straight-away.



Messages sorted by: Reverse Date, Date, Thread, Author