git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] bash: complete more options for 'git rebase'
@ 2009-10-17  9:33 Björn Gustavsson
  2009-10-28  0:32 ` Shawn O. Pearce
  0 siblings, 1 reply; 3+ messages in thread
From: Björn Gustavsson @ 2009-10-17  9:33 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git

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

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2009-10-28  7:19 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-17  9:33 [PATCH] bash: complete more options for 'git rebase' Björn Gustavsson
2009-10-28  0:32 ` Shawn O. Pearce
2009-10-28  7:19   ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).