git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] completion: add support for 'git blame'
@ 2011-06-27  8:45 Namhyung Kim
  0 siblings, 0 replies; only message in thread
From: Namhyung Kim @ 2011-06-27  8:45 UTC (permalink / raw)
  To: Shawn O. Pearce; +Cc: git

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 contrib/completion/git-completion.bash |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)

diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 5a83090..bebadda 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1118,6 +1118,28 @@ _git_bisect ()
 	esac
 }
 
+_git_blame ()
+{
+	__git_has_doubledash && return
+
+	case "$cur" in
+	--date=*)
+		__gitcomp "$__git_log_date_formats" "" "${cur##--date=}"
+		;;
+	--*)
+		__gitcomp "
+			--incremental --root --show-stats --score-debug
+			--show-name --show-number --porcelain
+			--line-porcelain --show-email --contents
+			--abbrev= --date= --encoding --reverse
+			"
+		;;
+	*)
+		COMPREPLY=()
+		;;
+	esac
+}
+
 _git_branch ()
 {
 	local i c=1 only_local_ref="n" has_r="n"
-- 
1.7.6

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2011-06-27  8:56 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-06-27  8:45 [PATCH] completion: add support for 'git blame' Namhyung Kim

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