threads / patch / 4415

patchbuiltin-grep: pass ignore case option to external grep

Subject: [PATCH] builtin-grep: pass ignore case option to external grep

## tl;dr

2 messages between Jun 6, 2006 and Jun 6, 2006. Diffs are folded; open one to read it.

replies: 1people: 2as markdown or json

Robert Fitzsimons· Jun 6, 2006, 23:15 UTC · lore

Don't just read the --ignore-case/-i option, pass the flag on to the external grep program.

Signed-off-by: Robert Fitzsimons <robfitz@273k.net>
---
 builtin-grep.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
Show changes to builtin-grep.c +2 −0
diff --git a/builtin-grep.c b/builtin-grep.c
index acc4eea..5fac570 100644
--- a/builtin-grep.c
+++ b/builtin-grep.c
@@ -459,6 +459,8 @@ static int external_grep(struct grep_opt
 		push_arg("-n");
 	if (opt->regflags & REG_EXTENDED)
 		push_arg("-E");
+	if (opt->regflags & REG_ICASE)
+		push_arg("-i");
 	if (opt->word_regexp)
 		push_arg("-w");
 	if (opt->name_only)
-- 
1.3.3.g16a4-dirty
Linus Torvalds· Jun 6, 2006, 23:27 UTC · re: Robert Fitzsimons · lore

Re: [PATCH] builtin-grep: pass ignore case option to external grep

On Tue, 6 Jun 2006, Robert Fitzsimons wrote:
>
> Don't just read the --ignore-case/-i option, pass the flag on to the
> external grep program.
Oops. How did we miss that one ;)
Embarrassing.
		Linus

← back to recent threads