From: Peter Stephenson <p.stephenson@samsung.com>
To: Zsh Users' List <zsh-users@zsh.org>
Subject: tag-order with git refs
Date: Wed, 07 Oct 2015 12:08:20 +0100 [thread overview]
Message-ID: <20151007120820.6f8a59e9@pwslap01u.europe.root.pri> (raw)
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
and certainly the look-up of the style and context appears to be
working. But the match against the actual tag doesn't work (proved by
adding "-" to the end, which gives me no matches at all).
The manual implies patterns should work as tags (i.e. values of the
tag-order style) but I'm getting bizarre results --- e,g '[a-z]*' gives
me everything, '[a-m]*' gives me nothing, '[n-z]*' gives me only options
and nothing else (all these with the "-" element appended for debugging
purposes). Indeed, 'o*' gives me options. However, '[a-np-z]*' gives
all the matches (other than options) I expect. Further playing suggests
patterns are just not working how I expect. Not that I'm particularly
interested in patterns, I'm just trying to narrow down the tags by hook
or by crook and failing dismally.
This is related to stuff down in the bowels where it calls "comptry -m
tag", so I'm unlikely to be able to get to the bottom of this in a
finite lifetime.
pws
next reply other threads:[~2015-10-07 11:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-07 11:08 Peter Stephenson [this message]
2015-10-07 13:01 ` Mikael Magnusson
2015-10-07 13:24 ` Peter Stephenson
2015-10-07 19:06 ` Bart Schaefer
2015-10-07 22:22 ` Oliver Kiddle
2015-10-08 3:50 ` Bart Schaefer
2015-10-08 9:39 ` Peter Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151007120820.6f8a59e9@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).