Re: [PATCH v2] completion: add new git_complete helper

3 messages, 3 authors, 2016-06-15 · open the first message on its own page

Re: [PATCH v2] completion: add new git_complete helper

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:53:37

Felipe Contreras [off-list ref] writes:
2012/4/17 SZEDER Gábor [off-list ref]:
quoted
On Sun, Apr 15, 2012 at 04:37:18PM -0500, Jonathan Nieder wrote:
quoted
Felipe Contreras wrote:
quoted
quoted
A name like __git_complete should work, presumably.
And foo_wrap() should also fit into those namespaces.
Yeah, I don't have a problem with that, just forgot about it.

But git_complete I think is different.
Is git_complete something the user types interactively, or is it meant to
be used in their .bashrc to help them complete arguments to their custom
scripts that take arguments similar to Git Porcelains?

Re: [PATCH v2] completion: add new git_complete helper

From: Felipe Contreras <hidden>
Date: 2016-06-15 22:53:37

On Tue, Apr 17, 2012 at 6:50 PM, Junio C Hamano [off-list ref] wrote:
Felipe Contreras [off-list ref] writes:
quoted
2012/4/17 SZEDER Gábor [off-list ref]:
quoted
On Sun, Apr 15, 2012 at 04:37:18PM -0500, Jonathan Nieder wrote:
quoted
Felipe Contreras wrote:
quoted
quoted
A name like __git_complete should work, presumably.
And foo_wrap() should also fit into those namespaces.
Yeah, I don't have a problem with that, just forgot about it.

But git_complete I think is different.
Is git_complete something the user types interactively, or is it meant to
be used in their .bashrc to help them complete arguments to their custom
scripts that take arguments similar to Git Porcelains?
It's meant for their .bashrc, but can be used interactively, exactly
like 'complete'. You can type 'complete -o bashdefault -o default -o
nospace -F _git git' in the command like, but that would rarely
happen.

-- 
Felipe Contreras

Re: [PATCH v2] completion: add new git_complete helper

From: SZEDER Gábor <hidden>
Date: 2016-06-15 22:53:37

On Tue, Apr 17, 2012 at 08:50:01AM -0700, Junio C Hamano wrote:
Felipe Contreras [off-list ref] writes:
quoted
2012/4/17 SZEDER Gábor [off-list ref]:
quoted
On Sun, Apr 15, 2012 at 04:37:18PM -0500, Jonathan Nieder wrote:
quoted
Felipe Contreras wrote:
quoted
quoted
A name like __git_complete should work, presumably.
And foo_wrap() should also fit into those namespaces.
Yeah, I don't have a problem with that, just forgot about it.

But git_complete I think is different.
Is git_complete something the user types interactively, or is it meant to
be used in their .bashrc to help them complete arguments to their custom
scripts that take arguments similar to Git Porcelains?
Primarily for .bashrc, however, not for their custom scripts but to be
able to use completion for their one-word git aliases, e.g. after an

  alias gf='git fetch'

they want to do

  gf o<TAB>

and get 'origin' completed.

Here's a relevant thread:

  http://thread.gmane.org/gmane.comp.version-control.git/185184/


Best,
Gábor
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help