From 36ee63d30ee076e6f6a8fdeabd50bf6757a3fdd6 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 2 Feb 2021 22:11:40 -1000 Subject: [PATCH] lei: help starts pager 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; } -- 2.44.0