git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RFD] minor frustration in 'git add' pathname completion
@ 2016-03-24 21:44 Junio C Hamano
  2016-03-24 21:56 ` Stefan Beller
  2016-03-24 22:29 ` Junio C Hamano
  0 siblings, 2 replies; 8+ messages in thread
From: Junio C Hamano @ 2016-03-24 21:44 UTC (permalink / raw)
  To: git

It seems that "git add foo<TAB>" completes to files

 (1) whose names match 'foo*',

 (2) that are not ignored (i.e. "foobar~" will not be offered for
     Emacs users), and

 (3) are different from the index.

The last one is somewhat frustrating at times.  For example, I keep
a backup version of whats-cooking.txt in the working tree that I use
to manage the 'todo' branch as whats-cooking.txt+, and this is not
explicitly "ignored".  Most of the time, I have changes to the real
file, so

    $ git add whats<TAB>

would complete to "whats-cooking.txt" (because there are two
candidates, "whats-cooking.txt" and "whats-cooking.txt+", and the
first completion is done up to the common prefix) and everything is
good.

Immediately after I did "git add whats-cooking.txt", however,
because of (3), the completion for 

    $ git add whats<TAB>

offers "whats-cooking.txt+", because that is the only candidate that
passes all three criteria.  This is quite annoying and even dangerous,
because it does not happen most of the time.

I am wondering if there is a downside to removing (3) from the
completion logic.

Discuss.

Thanks.

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2016-03-25  0:38 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-24 21:44 [RFD] minor frustration in 'git add' pathname completion Junio C Hamano
2016-03-24 21:56 ` Stefan Beller
2016-03-24 22:06   ` Junio C Hamano
2016-03-24 22:27     ` Junio C Hamano
2016-03-24 22:40     ` Stefan Beller
2016-03-24 22:55       ` Junio C Hamano
2016-03-25  0:38         ` Jacob Keller
2016-03-24 22:29 ` Junio C Hamano

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).