]> Sergey Matveev's repositories - public-inbox.git/commitdiff
lei: help starts pager
authorEric Wong <e@80x24.org>
Wed, 3 Feb 2021 08:11:40 +0000 (22:11 -1000)
committerEric Wong <e@80x24.org>
Thu, 4 Feb 2021 01:37:09 +0000 (01:37 +0000)
Because some commands have many options which take up
multiple screens.

lib/PublicInbox/LEI.pm

index 3cb7a32779f168e7fbdae1e141d39da20fb4d22a..005f6f7a33c15af50add827b3074ad430de911d1 100644 (file)
@@ -507,7 +507,9 @@ EOF
                $msg .= $rhs;
                $msg .= "\n";
        }
-       print { $self->{$errmsg ? 2 : 1} } $msg;
+       my $out = $self->{$errmsg ? 2 : 1};
+       start_pager($self) if -t $out;
+       print $out $msg;
        x_it($self, $errmsg ? 1 << 8 : 0); # stderr => failure
        undef;
 }