bash completion: add --format= and --oneline options for "git log"
We also add --format= completion for "git show". Signed-off-by: Teemu Likonen <tlikonen@iki.fi> Acked-by: Shawn O. Pearce <spearce@spearce.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Teemu Likonen committed
Feb 24, 2009 at 15:33 UTC
72de29c24f50dccc5f045a7756bb0b47e34a7a8e
1 file changed
+12
-2
contrib/completion/git-completion.bash
+12
-2
@@ -1014,6 +1014,11 @@ _git_log ()
1014
" "" "${cur##--pretty=}"
1015
return
1016
;;
1017
+ --format=*)
1018
+ __gitcomp "$__git_log_pretty_formats
1019
+ " "" "${cur##--format=}"
1020
+ return
1021
+ ;;
1022
--date=*)
1023
__gitcomp "
1024
relative iso8601 rfc2822 short local default
@@ -1029,7 +1034,7 @@ _git_log ()
1034
--follow
1035
--abbrev-commit --abbrev=
1036
--relative-date --date=
1032
- --pretty=
1037
+ --pretty= --format= --oneline
1038
--cherry-pick
1039
--graph
1040
--decorate
@@ -1541,8 +1546,13 @@ _git_show ()
1546
" "" "${cur##--pretty=}"
1547
return
1548
;;
1549
+ --format=*)
1550
+ __gitcomp "$__git_log_pretty_formats
1551
+ " "" "${cur##--format=}"
1552
+ return
1553
+ ;;
1554
--*)
1545
- __gitcomp "--pretty=
1555
+ __gitcomp "--pretty= --format=
1556
$__git_diff_common_options
1557
"
1558
return