Skip to content

Commit 16d9c40

Browse files
ilya-bobyrgitster
authored andcommitted
completion: Support --patch-{grep,modifies}
Signed-off-by: Junio C Hamano <[email protected]>
1 parent 5463eea commit 16d9c40

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

contrib/completion/git-completion.bash

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1900,6 +1900,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary
19001900
--output= --output-indicator-context=
19011901
--output-indicator-new= --output-indicator-old=
19021902
--ws-error-highlight=
1903+
--patch-grep= --patch-modifies=
19031904
--pickaxe-all --pickaxe-regex --patch-with-raw
19041905
"
19051906

@@ -2216,7 +2217,7 @@ __git_complete_log_opts ()
22162217
__git_complete_symbol --cur="${cur#:}" --sfx=":"
22172218
return
22182219
;;
2219-
-G,*|-S,*)
2220+
-G,*|--patch-grep,*|-S,*|--patch-modifies,*)
22202221
__git_complete_symbol
22212222
return
22222223
;;
@@ -2239,6 +2240,14 @@ __git_complete_log_opts ()
22392240
__gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}"
22402241
return
22412242
;;
2243+
--patch-grep=*)
2244+
__git_complete_symbol --pfx="--patch-grep=" --cur="${cur#--patch-grep=}"
2245+
return
2246+
;;
2247+
--patch-modifies=*)
2248+
__git_complete_symbol --pfx="--patch-modifies=" --cur="${cur#--patch-modifies=}"
2249+
return
2250+
;;
22422251
--submodule=*)
22432252
__gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}"
22442253
return

0 commit comments

Comments
 (0)