From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-3.9 required=3.0 tests=ALL_TRUSTED,AWL,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id EE5BB2007E for ; Wed, 3 Feb 2021 08:11:44 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 08/11] lei: help starts pager Date: Tue, 2 Feb 2021 22:11:40 -1000 Message-Id: <20210203081143.24424-9-e@80x24.org> In-Reply-To: <20210203081143.24424-1-e@80x24.org> References: <20210203081143.24424-1-e@80x24.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit List-Id: Because some commands have many options which take up multiple screens. --- lib/PublicInbox/LEI.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/PublicInbox/LEI.pm b/lib/PublicInbox/LEI.pm index 3cb7a327..005f6f7a 100644 --- a/lib/PublicInbox/LEI.pm +++ b/lib/PublicInbox/LEI.pm @@ -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; }