threads / discuss / 18158

git push bash completion

Subject: git push bash completion

## tl;dr

3 messages between Mar 5, 2009 and Mar 6, 2009.

replies: 2people: 3as markdown or json

Sverre Rabbelier· Mar 5, 2009, 22:30 UTC · lore
Heya,
Observe:
$ git push ori<tab>
  git push origin
$ git push -f ori<tab>
  git push -f origin/

Something weird going on there, or is this intentional and am I missing something?

-- 
Cheers,

Sverre Rabbelier
Markus Heidelberg· Mar 5, 2009, 23:15 UTC · re: Sverre Rabbelier · lore

Re: git push bash completion

Sverre Rabbelier, 05.03.2009:
Show 11 quoted lines
> Heya,
> 
> Observe:
> $ git push ori<tab>
>   git push origin
> 
> $ git push -f ori<tab>
>   git push -f origin/
> 
> Something weird going on there, or is this intentional and am I
> missing something?

Something similar happens with fetch and pull. They only complete the remote name, when exactly 2 words are existing on the command line ("git" and the subcommand) by: if [ "$COMP_CWORD" = 2 ]

Doesn't seem right.
Markus
Jay Soffian· Mar 6, 2009, 01:57 UTC · re: Markus Heidelberg · lore

Re: git push bash completion

On Thu, Mar 5, 2009 at 6:15 PM, Markus Heidelberg <markus.heidelberg@web.de> wrote:

Show 5 quoted lines
> Something similar happens with fetch and pull. They only complete the
> remote name, when exactly 2 words are existing on the command line
> ("git" and the subcommand) by: if [ "$COMP_CWORD" = 2 ]
>
> Doesn't seem right.
I'm working on a fix. I hope to have it out tonight for review.
j.

← back to recent threads