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

Re: completion, sorting of options



On 11/4/23, Thomas Lauer <thomas.lauer@xxxxxxxxxx> wrote:
> So I'm writing my first completion file (gory thing, just the right
> thing for a rainy Sat afternoon). The completion file itself is more or
> less working, but I've run into trouble with the options display after
> "-<TAB>".
>
> Basically what I want to achieve is that the options are listed in
> precisely the order given in the completion file (there are many options
> and some are much more probable to be used than others, so I want these
> at the top (I know that further typing will limit the shown completions
> but not all people using this will be up to that... a simple up/down
> might work better for some)).

If you give -V foo it will create an unsorted group, but it is a bit
unconventional to do this for sorting regular options by usage. You
could also consider adding the common options with a -J common and the
other ones with a -J rare, or something to that effect.

-- 
Mikael Magnusson




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