Re: What's cooking in git.git (Jun 2013, #03; Thu, 6)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jun 07, 2013 at 02:53:02PM -0700, Junio C Hamano wrote:
> SZEDER Gábor <szeder@xxxxxxxxxx> 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

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]