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

Re: tag-order with git refs



On Wed, Oct 7, 2015 at 1:08 PM, Peter Stephenson
<p.stephenson@xxxxxxxxxxx> wrote:
> Things that have been bugging me for ages but I never dared ask
> about...
>
> Notionally this is a user question, though I suspect it's soon going to
> drift down the implementation.
>
> How do I limit completion after "git checkout" to showing local heads
> first (i.e. branches I actually use)?
>
> If you can demonstrably get this to work (please don't waste time
> posting untried solutions), feel free to give tne answer and ignore the
> following.
>
> From the output of ^xh it should be something like
>
> zstyle ':completion:*:complete:git-checkout:*' tag-order heads-local

I get the same result as you; this has no effect. However,
zstyle ':completion:*:complete:git-checkout:*' group-order heads-local
does work. The question is a bit unclear, you can't limit something to
being shown first, but at least with group-order, if you don't mind
getting spammed with other results, just hitting tab a few times will
get you the branches you want first. Arguably this should be the
default order too, without having to muck around with custom styles.

-- 
Mikael Magnusson



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