# [PATCH] bash: complete more options for 'git rebase'

3 messages from 2009-10-17 to 2009-10-28. Participants: Björn Gustavsson, Shawn O. Pearce, Junio C Hamano.
Thread: https://gitlist.dev/t/21264

## Björn Gustavsson, 2009-10-17 09:33

Subject: [PATCH] bash: complete more options for 'git rebase'
Message-ID: <4AD98F72.1060901@gmail.com>
URL: https://gitlist.dev/e/4AD98F72.1060901%40gmail.com

```
Complete all long options for 'git rebase' except --no-verify
(probably used very seldom) and the long options corresponding
to -v, -q, and -f.

Signed-off-by: Björn Gustavsson <bgustavsson@gmail.com>
---
I am primarily interested in having the --whitespace= option completed,
but while at it I have added completion for the other potentially useful
long options.

 contrib/completion/git-completion.bash |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index d3fec32..7c7318c 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1323,8 +1323,18 @@ _git_rebase ()
 	fi
 	__git_complete_strategy && return
 	case "$cur" in
+	--whitespace=*)
+		__gitcomp "$__git_whitespacelist" "" "${cur##--whitespace=}"
+		return
+		;;
 	--*)
-		__gitcomp "--onto --merge --strategy --interactive"
+		__gitcomp "
+			--onto --merge --strategy --interactive
+			--preserve-merges --stat --no-stat
+			--committer-date-is-author-date --ignore-date
+			--ignore-whitespace --whitespace=
+			"
+
 		return
 	esac
 	__gitcomp "$(__git_refs)"
-- 
1.6.5.2.gd6127

```

## Shawn O. Pearce, 2009-10-28 00:32

Subject: Re: [PATCH] bash: complete more options for 'git rebase'
Message-ID: <20091028003208.GO10505@spearce.org>
URL: https://gitlist.dev/e/20091028003208.GO10505%40spearce.org
In-Reply-To: <4AD98F72.1060901@gmail.com>

```
Bj??rn Gustavsson <bgustavsson@gmail.com> wrote:
> Complete all long options for 'git rebase' except --no-verify
> (probably used very seldom) and the long options corresponding
> to -v, -q, and -f.
> 
> Signed-off-by: Bj??rn Gustavsson <bgustavsson@gmail.com>

Acked-by: Shawn O. Pearce <spearce@spearce.org>

> I am primarily interested in having the --whitespace= option completed,
> but while at it I have added completion for the other potentially useful
> long options.

Indeed, this would be nice.  :-)
 
-- 
Shawn.

```

## Junio C Hamano, 2009-10-28 07:19

Subject: Re: [PATCH] bash: complete more options for 'git rebase'
Message-ID: <7viqe0rnn7.fsf@alter.siamese.dyndns.org>
URL: https://gitlist.dev/e/7viqe0rnn7.fsf%40alter.siamese.dyndns.org
In-Reply-To: <20091028003208.GO10505@spearce.org>

```
"Shawn O. Pearce" <spearce@spearce.org> writes:

> Bj??rn Gustavsson <bgustavsson@gmail.com> wrote:
>> Complete all long options for 'git rebase' except --no-verify
>> (probably used very seldom) and the long options corresponding
>> to -v, -q, and -f.
>> 
>> Signed-off-by: Bj�rn Gustavsson <bgustavsson@gmail.com>
>
> Acked-by: Shawn O. Pearce <spearce@spearce.org>
>
>> I am primarily interested in having the --whitespace= option completed,
>> but while at it I have added completion for the other potentially useful
>> long options.

Thanks.

```
