mirror of
https://github.com/git/git
synced 2024-08-27 19:49:21 +00:00
git grep -O -i: if the pager is 'less', pass the '-i' option
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
This commit is contained in:
parent
6593b01519
commit
81c5a08574
|
@ -1067,6 +1067,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 (!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",
|
||||
|
|
Loading…
Reference in a new issue