Message ID | 20250212032657.1807939-8-illia.bobyr@gmail.com (mailing list archive) |
---|---|
State | New |
Headers | show |
Series | Long names for `git log -S` and `git log -G` | expand |
Illia Bobyr <illia.bobyr@gmail.com> writes: > Subject: Re: [PATCH v5 07/10] completion: Support --patch-{grep,modifies} "Support" -> "support". > --- > contrib/completion/git-completion.bash | 11 ++++++++++- > 1 file changed, 10 insertions(+), 1 deletion(-) Missing sign-off. Other than that, this is a great material to be part of the main topic to add the longhands to these two options. Thanks. > diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash > index 41391..daf335 100644 > --- a/contrib/completion/git-completion.bash > +++ b/contrib/completion/git-completion.bash > @@ -1900,6 +1900,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary > --output= --output-indicator-context= > --output-indicator-new= --output-indicator-old= > --ws-error-highlight= > + --patch-grep= --patch-modifies= > --pickaxe-all --pickaxe-regex --patch-with-raw > " > > @@ -2216,7 +2217,7 @@ __git_complete_log_opts () > __git_complete_symbol --cur="${cur#:}" --sfx=":" > return > ;; > - -G,*|-S,*) > + -G,*|--patch-grep,*|-S,*|--patch-modifies,*) > __git_complete_symbol > return > ;; > @@ -2239,6 +2240,14 @@ __git_complete_log_opts () > __gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}" > return > ;; > + --patch-grep=*) > + __git_complete_symbol --pfx="--patch-grep=" --cur="${cur#--patch-grep=}" > + return > + ;; > + --patch-modifies=*) > + __git_complete_symbol --pfx="--patch-modifies=" --cur="${cur#--patch-modifies=}" > + return > + ;; > --submodule=*) > __gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}" > return
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash index 41391..daf335 100644 --- a/contrib/completion/git-completion.bash +++ b/contrib/completion/git-completion.bash @@ -1900,6 +1900,7 @@ __git_diff_common_options="--stat --numstat --shortstat --summary --output= --output-indicator-context= --output-indicator-new= --output-indicator-old= --ws-error-highlight= + --patch-grep= --patch-modifies= --pickaxe-all --pickaxe-regex --patch-with-raw " @@ -2216,7 +2217,7 @@ __git_complete_log_opts () __git_complete_symbol --cur="${cur#:}" --sfx=":" return ;; - -G,*|-S,*) + -G,*|--patch-grep,*|-S,*|--patch-modifies,*) __git_complete_symbol return ;; @@ -2239,6 +2240,14 @@ __git_complete_log_opts () __gitcomp "$__git_diff_algorithms" "" "${cur##--diff-algorithm=}" return ;; + --patch-grep=*) + __git_complete_symbol --pfx="--patch-grep=" --cur="${cur#--patch-grep=}" + return + ;; + --patch-modifies=*) + __git_complete_symbol --pfx="--patch-modifies=" --cur="${cur#--patch-modifies=}" + return + ;; --submodule=*) __gitcomp "$__git_diff_submodule_formats" "" "${cur##--submodule=}" return