diff options
Diffstat (limited to 'builtin')
-rw-r--r-- | builtin/grep.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/builtin/grep.c b/builtin/grep.c index 63f86032d9..1892335c06 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -876,6 +876,9 @@ int cmd_grep(int argc, const char **argv, const char *prefix) if (len > 4 && is_dir_sep(pager[len - 5])) pager += len - 4; + if (opt.ignore_case && !strcmp("less", pager)) + string_list_append(&path_list, "-I"); + if (!strcmp("less", pager) || !strcmp("vi", pager)) { struct strbuf buf = STRBUF_INIT; strbuf_addf(&buf, "+/%s%s", |