diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-10-26 16:42:09 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-10-26 16:42:09 -0400 |
| commit | 195b074a0bf0d89a8b5729825a46bbe1b7ec37d7 (patch) | |
| tree | 24da75ca79d3750d365339c3db58543f22881ecc | |
| parent | c22b4c99ba4e66dcbf97ce0fb4b6c38372e20be6 (diff) | |
| download | greypool-195b074a0bf0d89a8b5729825a46bbe1b7ec37d7.tar.gz | |
Add -P/--no-pager option.
| -rwxr-xr-x | greypool | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -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<<link stylesheet="...">>). Don't print any messages to standard error, except errors and warning. +=item B<-P>, B<--no-pager> + +Ignores B<pager> from the config file; output is sent directly to the +terminal. + =item B<-v>, B<--verbose> Print extra informational messages about what B<greypool> is doing, @@ -906,7 +912,10 @@ Print B<greypool> version and exit. =item B<--help> -Display documentation using your pager. +Display documentation using your pager: either B<PAGER> from the +environment, or B<less> if it's not set. This I<doesn't> use the pager +defined in your config file, since the config file doesn't get read +when B<--help> is used. =item B<--man> |
