aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2026-10-21 06:43:04 -0400
committerB. Watson <urchlay@slackware.uk>2026-10-21 06:43:04 -0400
commita0d0014b7b39b89de96c82d360dcf488f59d949e (patch)
treecfd71ca48b53a9aff412b3d16ef95c33c9e7ebc5
parent4a0af221b7600328e1c62b5cea9b7be891132244 (diff)
downloadgreypool-a0d0014b7b39b89de96c82d360dcf488f59d949e.tar.gz
Colorize HTML report even if stdout is a non-tty. Now it acts like the docs say it does.
-rwxr-xr-xgreypool3
1 files changed, 2 insertions, 1 deletions
diff --git a/greypool b/greypool
index 7dd8b04..8a2b458 100755
--- a/greypool
+++ b/greypool
@@ -80,13 +80,14 @@ sub parse_opts {
"doc|help" => sub { exec("perldoc $0"); },
"man" => sub { exec("pod2man --stderr -s1 -cgreypool -r$VERSION $0"); },
"color|colour|c" => \$color_output,
- "mono|no-color|no-colour|m" => sub { $color_output = 0; },
+ "mono|no-color|no-colour|m" => sub { $color_output = 0; $mono = 1; },
"config-dir|C=s" => \$privdir,
"quiet|q" => sub { $verbose = 0; },
) or fatal("error in command line options (try --help).");
$html = 1 if $html_frag;
$html = 0 if $csv_output;
+ $color_output = 1 if $html && !$mono;
fatal "can't use -f/--force and -n/--cached together"
if $force_download && $no_download;