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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Robert Fitzsimons <robfitz@xxxxxxxx>
---
 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

-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]