From: "SZEDER Gábor" <szeder@ira.uka.de>
To: Junio C Hamano <gitster@pobox.com>
Cc: Ramkumar Ramachandra <artagnon@gmail.com>, git@vger.kernel.org
Subject: Re: What's cooking in git.git (Jun 2013, #03; Thu, 6)
Date: Sat, 8 Jun 2013 02:11:47 +0200 [thread overview]
Message-ID: <20130608001147.GA32350@goldbirke> (raw)
In-Reply-To: <7vk3m5si4h.fsf@alter.siamese.dyndns.org>
On Fri, Jun 07, 2013 at 02:53:02PM -0700, Junio C Hamano wrote:
> SZEDER Gábor <szeder@ira.uka.de> writes:
>
> > On Fri, Jun 07, 2013 at 12:46:25PM -0700, Junio C Hamano wrote:
> >> Thanks for a pointer. I think what I was suggesting was slightly
> >> different in that I was hoping to see a single helper that knows to
> >> complete to object names (possibly including trees/blobs with the
> >> treeish:path notation), ranges, and pathnames (not treeish:path
> >> notation) until it sees a "--" and then complete only to pathnames.
> >
> > We already got that except the completion of pathnames before "--",
> > and I don't know how that could be done properly for commands taking
> > both refs and paths.
> > ...
> > git diff git.c
> > git diff master git.c
> > git diff master next git.c
>
> It is somewhat annoying that "git diff gi<TAB>" stops at expanding
> it to "git diff git" and then upon another "git diff git<TAB>"
> offers tags whose names begin with "git" (e.g. gitgui-0.10.0) but
> the pathname git.c is not included in the choices. My wish was to
> take the union in such a fairly limited case. I tend to agree with
> you that "git diff <TAB>" that expands to all refs and pathnames
> would be useless, but so is expansion to all pathnames (or refnames
> for that matter).
... or trying to complete a branch name starting with a 'v', and then
getting all the vx.y.z tags.
If you know you want git.c, then you can force filename completion
either by entering "--" before hitting tab or by using the Alt-/ Bash
(readline?) keybinding, otherwise you'll get refs. I think this is
more than adequate, as it brings the best of both worlds: you can
quickly and easily get both ref-only and file-only completion.
Training your fingers to type "--" is perhaps better, just in case
we'll ever do tracked-file-aware filename completion for e.g. 'git log
-- g<TAB>' in the future.
Best,
Gábor
next prev parent reply other threads:[~2013-06-08 0:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-06 22:41 What's cooking in git.git (Jun 2013, #03; Thu, 6) Junio C Hamano
2013-06-07 0:00 ` SZEDER Gábor
2013-06-07 1:05 ` Junio C Hamano
2013-06-07 15:57 ` Junio C Hamano
2013-06-07 19:34 ` SZEDER Gábor
2013-06-07 19:47 ` Ramkumar Ramachandra
2013-06-07 20:06 ` SZEDER Gábor
2013-06-07 17:30 ` Ramkumar Ramachandra
2013-06-07 18:41 ` Junio C Hamano
2013-06-07 19:01 ` Ramkumar Ramachandra
2013-06-07 19:16 ` SZEDER Gábor
2013-06-07 19:46 ` Junio C Hamano
2013-06-07 20:44 ` SZEDER Gábor
2013-06-07 21:53 ` Junio C Hamano
2013-06-08 0:11 ` SZEDER Gábor [this message]
2013-06-09 21:20 ` Junio C Hamano
2013-06-09 21:48 ` SZEDER Gábor
2013-06-09 22:56 ` Junio C Hamano
2013-06-10 6:25 ` Ramkumar Ramachandra
2013-06-10 7:00 ` Junio C Hamano
2013-06-10 7:41 ` Ramkumar Ramachandra
2013-06-07 18:55 ` SZEDER Gábor
2013-06-08 15:30 ` Ramkumar Ramachandra
2013-06-08 18:39 ` Matthieu Moy
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=20130608001147.GA32350@goldbirke \
--to=szeder@ira.uka.de \
--cc=artagnon@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
/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.
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).