threads / patch / 20475

patch, 9 partsadd missing long option to 'git grep' bash competion

Subject: [PATCH 4/9] add missing long option to 'git grep' bash competion

## tl;dr

3 messages between Aug 8, 2009 and Aug 8, 2009. Diffs are folded; open one to read it.

replies: 2people: 2as markdown or json

Emmanuel Trillaud· Aug 8, 2009, 08:56 UTC · lore

according to the 'git-grep' man page, the following long options are missing from the 'git grep' bash completion : --null --color --no-color

Signed-off-by: Emmanuel Trillaud <etrillaud@gmail.com>
---
 contrib/completion/git-completion.bash |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Show changes to contrib/completion/git-completion.bash +2 −0
diff --git a/contrib/completion/git-completion.bash
b/contrib/completion/git-completion.bash
index f56733b..a4e78d5 100755
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -1057,7 +1057,9 @@ _git_grep ()
 			--extended-regexp --basic-regexp --fixed-strings
 			--files-with-matches --name-only
 			--files-without-match
+			--null
 			--count
+			--color --no-color
 			--and --or --not --all-match
 			"
 		return
-- 
1.6.4
Junio C Hamano· Aug 8, 2009, 19:48 UTC · re: Emmanuel Trillaud · lore

Re: [PATCH 4/9] add missing long option to 'git grep' bash competion

Emmanuel Trillaud <etrillaud@gmail.com> writes:
Show 5 quoted lines
> according to the 'git-grep' man page, the following long options are missing
> from the 'git grep' bash completion :
> --null
> --color
> --no-color

I do not think completion's purpose should be to offer everything available under the sun, so "according to manpage these are missing" can never be a good justification for patches in this series.

Does it even make sense to complete --null in an interactive invocation?
Emmanuel Trillaud· Aug 8, 2009, 20:07 UTC · re: Junio C Hamano · lore

Re: [PATCH 4/9] add missing long option to 'git grep' bash competion

Show 9 quoted lines
> > according to the 'git-grep' man page, the following long options are
> > missing from the 'git grep' bash completion :
> > --null
> > --color
> > --no-color
> 
> I do not think completion's purpose should be to offer everything
> available under the sun, so "according to manpage these are missing" can
> never be a good justification for patches in this series.

When I saw that completion for the long options of 'git checkout' was mising, I just start looking around the docs to see if there wasn't other git commands with some missing completions. I see now it was a wrong way to update the git bash completion. I will soon come back with a new set of (more reasonnable) patches.

Emmanuel 

← back to recent threads