From 195b074a0bf0d89a8b5729825a46bbe1b7ec37d7 Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Mon, 26 Oct 2026 16:42:09 -0400 Subject: Add -P/--no-pager option. --- greypool | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/greypool b/greypool index 8be422a..325f8d5 100755 --- a/greypool +++ b/greypool @@ -96,6 +96,7 @@ sub parse_opts { "mono|no-color|no-colour|m" => sub { $color_output = 0; $mono = 1; }, "config-dir|C=s" => \$privdir, "quiet|q" => sub { $verbose = 0; }, + "no-pager|P" => \$no_pager, ) or fatal("error in command line options (try --help)."); $html = 1 if $html_frag; @@ -422,7 +423,7 @@ sub apply_config { $color_output = -t STDOUT; } - if(defined($pager) && -t STDOUT) { + if(!defined($no_pager) && defined($pager) && -t STDOUT) { open $outfh, "|$pager" or fatal "can't execute pager"; select $outfh; } @@ -894,6 +895,11 @@ stylesheet (e.g. B<>). Don't print any messages to standard error, except errors and warning. +=item B<-P>, B<--no-pager> + +Ignores B from the config file; output is sent directly to the +terminal. + =item B<-v>, B<--verbose> Print extra informational messages about what B is doing, @@ -906,7 +912,10 @@ Print B version and exit. =item B<--help> -Display documentation using your pager. +Display documentation using your pager: either B from the +environment, or B if it's not set. This I use the pager +defined in your config file, since the config file doesn't get read +when B<--help> is used. =item B<--man> -- cgit v1.2.3