Thread (1 message) 1 message, 1 author, 2016-06-15
DORMANTno replies

[PATCH] bash completion: add --format= and --oneline options for "git log"

From: Teemu Likonen <hidden>
Date: 2016-06-15 22:46:16
Subsystem: the rest · Maintainer: Linus Torvalds

Signed-off-by: Teemu Likonen <redacted>
---

I like this change and would immediately switch to using --format= and
--oneline instead of --pretty=. I think we should add these bash
completions too.


 contrib/completion/git-completion.bash |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 0a3092f..34396c2 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1012,10 +1012,15 @@ _git_log ()
 	--pretty=*)
 		__gitcomp "$__git_log_pretty_formats
 			" "" "${cur##--pretty=}"
 		return
 		;;
+	--format=*)
+		__gitcomp "$__git_log_pretty_formats
+			" "" "${cur##--format=}"
+		return
+		;;
 	--date=*)
 		__gitcomp "
 			relative iso8601 rfc2822 short local default
 		" "" "${cur##--date=}"
 		return
@@ -1028,10 +1033,12 @@ _git_log ()
 			--root --topo-order --date-order --reverse
 			--follow
 			--abbrev-commit --abbrev=
 			--relative-date --date=
 			--pretty=
+			--format=
+			--oneline
 			--cherry-pick
 			--graph
 			--decorate
 			--walk-reflogs
 			--parents --children
-- 
1.6.2.rc1.29.g79ccf
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help