From: Junio C Hamano Date: Fri, 07 Jun 2013 21:53:02 GMT Subject: Re: What's cooking in git.git (Jun 2013, #03; Thu, 6) Message-ID: <7vk3m5si4h.fsf@alter.siamese.dyndns.org> In-Reply-To: <20130607204430.GD31625@goldbirke> SZEDER Gábor 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" stops at expanding it to "git diff git" and then upon another "git diff git" 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 " that expands to all refs and pathnames would be useless, but so is expansion to all pathnames (or refnames for that matter). In any case, I wouldn't insist on AI perfection in the first place ;-). As long as it works reasonably well, I am happy (and I think the current completion code already works better than reasonably well, at least for me). Thanks.