Skip to content

Commit e67d71e

Browse files
szedergitster
authored andcommitted
completion: unite --format and --pretty for 'log' and 'show'
Signed-off-by: SZEDER Gábor <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent a8f89bf commit e67d71e

File tree

1 file changed

+4
-14
lines changed

1 file changed

+4
-14
lines changed

contrib/completion/git-completion.bash

Lines changed: 4 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,14 +1604,9 @@ _git_log ()
16041604
local cur
16051605
_get_comp_words_by_ref -n =: cur
16061606
case "$cur" in
1607-
--pretty=*)
1607+
--pretty=*|--format=*)
16081608
__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#*=}"
16151610
return
16161611
;;
16171612
--date=*)
@@ -2456,14 +2451,9 @@ _git_show ()
24562451
local cur
24572452
_get_comp_words_by_ref -n =: cur
24582453
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=*)
24652455
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
2466-
" "" "${cur##--format=}"
2456+
" "" "${cur#*=}"
24672457
return
24682458
;;
24692459
--*)

0 commit comments

Comments
 (0)