Skip to content

Commit 6e97fcc

Browse files
committed
Merge branch 'sg/completion'
* sg/completion: completion: unite --format and --pretty for 'log' and 'show' completion: unite --reuse-message and --reedit-message for 'notes'
2 parents e22bb14 + e67d71e commit 6e97fcc

File tree

1 file changed

+6
-18
lines changed

1 file changed

+6
-18
lines changed

contrib/completion/git-completion.bash

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1553,14 +1553,9 @@ _git_log ()
15531553
merge="--merge"
15541554
fi
15551555
case "$cur" in
1556-
--pretty=*)
1556+
--pretty=*|--format=*)
15571557
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
1558-
" "" "${cur##--pretty=}"
1559-
return
1560-
;;
1561-
--format=*)
1562-
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
1563-
" "" "${cur##--format=}"
1558+
" "" "${cur#*=}"
15641559
return
15651560
;;
15661561
--date=*)
@@ -1668,11 +1663,9 @@ _git_notes ()
16681663
;;
16691664
esac
16701665
;;
1671-
add,--reuse-message=*|append,--reuse-message=*)
1672-
__gitcomp "$(__git_refs)" "" "${cur##--reuse-message=}"
1673-
;;
1666+
add,--reuse-message=*|append,--reuse-message=*|\
16741667
add,--reedit-message=*|append,--reedit-message=*)
1675-
__gitcomp "$(__git_refs)" "" "${cur##--reedit-message=}"
1668+
__gitcomp "$(__git_refs)" "" "${cur#*=}"
16761669
;;
16771670
add,--*|append,--*)
16781671
__gitcomp '--file= --message= --reedit-message=
@@ -2367,14 +2360,9 @@ _git_show ()
23672360
__git_has_doubledash && return
23682361

23692362
case "$cur" in
2370-
--pretty=*)
2371-
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
2372-
" "" "${cur##--pretty=}"
2373-
return
2374-
;;
2375-
--format=*)
2363+
--pretty=*|--format=*)
23762364
__gitcomp "$__git_log_pretty_formats $(__git_pretty_aliases)
2377-
" "" "${cur##--format=}"
2365+
" "" "${cur#*=}"
23782366
return
23792367
;;
23802368
--*)

0 commit comments

Comments
 (0)