completion: unite --format and --pretty for 'log' and 'show'
Signed-off-by: SZEDER Gábor <szeder@ira.uka.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
SZEDER Gábor committed
Oct 8, 2011 at 03:09 UTC
e67d71e559724eacb6a799f8be42058da52a8580
1 file changed
+4
-14
contrib/completion/git-completion.bash
+4
-14
@@ -1604,14 +1604,9 @@ _git_log ()
1604
local cur
1605
_get_comp_words_by_ref -n =: cur
1606
case "$cur" in
1607
- --pretty=*)
1607
+ --pretty=*|--format=*)
1608
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
1609
- " "" "${cur##--pretty=}"
1610
- return
1611
- ;;
1612
- --format=*)
1613
- __gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
1614
- " "" "${cur##--format=}"
1609
+ " "" "${cur#*=}"
1610
return
1611
;;
1612
--date=*)
@@ -2456,14 +2451,9 @@ _git_show ()
2451
local cur
2452
_get_comp_words_by_ref -n =: cur
2453
case "$cur" in
2459
- --pretty=*)
2460
- __gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
2461
- " "" "${cur##--pretty=}"
2462
- return
2463
- ;;
2464
- --format=*)
2454
+ --pretty=*|--format=*)
2455
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
2466
- " "" "${cur##--format=}"
2456
+ " "" "${cur#*=}"
2457
return
2458
;;
2459
--*)