# git push bash completion

3 messages from 2009-03-05 to 2009-03-06. Participants: Sverre Rabbelier, Markus Heidelberg, Jay Soffian.
Thread: https://gitlist.dev/t/18158

## Sverre Rabbelier, 2009-03-05 22:30

Subject: git push bash completion
Message-ID: <fabb9a1e0903051430k5628fe26v4749360e026ac7d2@mail.gmail.com>
URL: https://gitlist.dev/e/fabb9a1e0903051430k5628fe26v4749360e026ac7d2%40mail.gmail.com

```
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, 2009-03-05 23:15

Subject: Re: git push bash completion
Message-ID: <200903060015.39834.markus.heidelberg@web.de>
URL: https://gitlist.dev/e/200903060015.39834.markus.heidelberg%40web.de
In-Reply-To: <fabb9a1e0903051430k5628fe26v4749360e026ac7d2@mail.gmail.com>

```
Sverre Rabbelier, 05.03.2009:
> 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, 2009-03-06 01:57

Subject: Re: git push bash completion
Message-ID: <76718490903051757j37511e2eq7f2bae26c1576f76@mail.gmail.com>
URL: https://gitlist.dev/e/76718490903051757j37511e2eq7f2bae26c1576f76%40mail.gmail.com
In-Reply-To: <200903060015.39834.markus.heidelberg@web.de>

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

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

```
