Thread (8 messages) flat view 8 messages, 2 authors, 2016-06-15
STALE3732d

[PATCH 2/2] bash: support pretty format aliases

From: SZEDER Gábor <hidden>
Date: 2016-06-15 22:49:47
Subsystem: the rest · Maintainer: Linus Torvalds

Users can have their own pretty format aliases since 8028184 (pretty:
add aliases for pretty formats, 2010-05-02), so let's offer those
after '--pretty=' and '--format=' for 'log' and 'show', too.

Signed-off-by: SZEDER Gábor <redacted>
---
 contrib/completion/git-completion.bash |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 97a3d8c..a4b6f78 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1368,11 +1368,13 @@ _git_log ()
 	case "$cur" in
 	--pretty=*)
 		__gitcomp "$__git_log_pretty_formats
+			$(__git_get_config_variables "pretty")
 			" "" "${cur##--pretty=}"
 		return
 		;;
 	--format=*)
 		__gitcomp "$__git_log_pretty_formats
+			$(__git_get_config_variables "pretty")
 			" "" "${cur##--format=}"
 		return
 		;;
@@ -2095,11 +2097,13 @@ _git_show ()
 	case "$cur" in
 	--pretty=*)
 		__gitcomp "$__git_log_pretty_formats
+			$(__git_get_config_variables "pretty")
 			" "" "${cur##--pretty=}"
 		return
 		;;
 	--format=*)
 		__gitcomp "$__git_log_pretty_formats
+			$(__git_get_config_variables "pretty")
 			" "" "${cur##--format=}"
 		return
 		;;
-- 
1.7.3.1.151.g3779c
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help