summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/src/exigrep.src3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/src/exigrep.src b/src/src/exigrep.src
index 45bdc2c80..851ca63bb 100644
--- a/src/src/exigrep.src
+++ b/src/src/exigrep.src
@@ -239,11 +239,12 @@ if (-t 1 and $use_pager)
{
foreach ($ENV{PAGER}//(), 'less', 'more')
{
+ local $ENV{LESS} .= ' --no-init --quit-if-one-screen';
open(my $pager, '|-', $_) or next;
select $pager;
last;
}
-}
+ }
# If file arguments are given, open each one and process according as it is
# is compressed or not.