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

Re: zsh completer _approximate completer



Sorry, ignore my last e-mail as I was wrong, again.

It seems that in the course of completion, the style is looked
up three times:

+_tags:31> zstyle -a :completion::complete:cd:: group-order order
+_tags:31> zstyle -a :completion::approximate::: group-order order
+_tags:31> zstyle -a :completion::approximate-1:cd:: group-order order

The first one would match ':completion:*' and so the group-order from
that style applies regardless of no matches being generated for that
context. The later group-orders are not completely ignored and it seems
they would be meaningful if they concerned a different set of groups.
I'm assuming they get ignored because they contradict the previous group
ordering.

This makes sense when you consider that a group-order is something that
can't be applied for specific matches: there is one ordering for all
matches. Perhaps a group-order from a tag loop where no matches are
actually generated should be thrown away.

So in conclusion, don't set group-order with a general style.

Oliver



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