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

completion, sorting of options



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)).

So I created a zstyle like this:

zstyle ':completion:*:*:mycmd:*:*' sort false

And this *does* change the order but not as expected. Rather, the
completion now first displays all single-letter options (-X), followed
by the -X=value options. Those two sublists are indeed shown in the same
order as in the completion file but in the completion the -X options
*follow* the -X=value options. So there's still something going on...
but I can't see what. (I've also tried "sort nosort"... no change).

Probably the zstyle still needs some more massaging but I haven't a clue
where to look... but one of the z-gurus might know?!

Thanks for helping out  T




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