threads / patch / 27707

patchcompletion: add support for 'git blame'

Subject: [PATCH] completion: add support for 'git blame'

## tl;dr

One message between Jun 27, 2011 and Jun 27, 2011. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Namhyung Kim· Jun 27, 2011, 08:45 UTC · lore
Signed-off-by: Namhyung Kim <namhyung@gmail.com>
---
 contrib/completion/git-completion.bash |   22 ++++++++++++++++++++++
 1 files changed, 22 insertions(+), 0 deletions(-)
Show changes to contrib/completion/git-completion.bash +22 −0
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

← back to recent threads