git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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

From
RFRobert Fitzsimons <robfitz@273k.net>
Date
Jun 6, 2006, 23:15 UTC
Message-ID
<20060606231516.GA18405@localhost>

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(-)
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
Next: Linus Torvalds
Message 1 of 2 in “builtin-grep: pass ignore case option to external grep”
  1. builtin-grep: pass ignore case option to external grepRobert Fitzsimons, Jun 6, 2006
  2. Linus TorvaldsJun 6, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.