exigrep: use less --quite-if-one-screen --no-init
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Tue, 4 Jul 2017 11:33:08 +0000 (13:33 +0200)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Tue, 4 Jul 2017 11:34:24 +0000 (13:34 +0200)
src/src/exigrep.src

index 45bdc2c80cffe3bafc2f2cfa08773fc37b4e4b8a..851ca63bba57750e0d05e928f1794c1e0d83f507 100644 (file)
@@ -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.