Re: [PATCH] bash completion: Fix the . -> .. revision range completion

!MAILaRCHIVE_VOTE_RePLACE
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: Petr Baudis <pasky@...>
Cc: Shawn O. Pearce <spearce@...>, <git@...>
Date: Sunday, July 13, 2008 - 5:38 pm

Petr Baudis <pasky@suse.cz> writes:


Modulo s/Git/bash-completion/ ;-) I think this makes sense.


Theoretically we could take a hint from presense of '--' like d773c63
(bash: offer only paths after '--', 2008-07-08) did.  If the command line
has double-dash and the token we are looking at is before it, it cannot be
pathname and this check does not have to trigger.  But I agree that is not
worth it, because this "theoretical" solution would mean that the user
needs to something awkward like:

	git log v1.5.6. --<C-b><C-b><C-b><TAB>

to take advantage of it.

By the way, the above command line is another "dot" related frustration I
always have.  If you try:

	git log v1.5.6.<TAB>

the completion code adds a dot unconditionally when I want to choose from
the list of v1.5.6.X tags.  Of course, I can work this around by dropping
the last dot before asking for completion, so it is not really a very big
deal, but I mention it here because this annoyance is exactly in the same
league as your "git-submodule.<TAB>" example.

"git show v1.5.6.<TAB>" does complete as expected, which is understandable
(the command does not take range, and completion knows about it -- which
is quite nice).


There is a slight Yuck factor for using "ls" here but I do not think of a
better alternative offhand.

Will queue on top of Shawn's previous one.  Thanks.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [PATCH] bash completion: Fix the . -> .. revision ran..., Junio C Hamano, (Sun Jul 13, 5:38 pm)