diff options
| author | B. Watson <urchlay@slackware.uk> | 2026-10-21 06:43:04 -0400 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2026-10-21 06:43:04 -0400 |
| commit | a0d0014b7b39b89de96c82d360dcf488f59d949e (patch) | |
| tree | cfd71ca48b53a9aff412b3d16ef95c33c9e7ebc5 | |
| parent | 4a0af221b7600328e1c62b5cea9b7be891132244 (diff) | |
| download | greypool-a0d0014b7b39b89de96c82d360dcf488f59d949e.tar.gz | |
Colorize HTML report even if stdout is a non-tty. Now it acts like the docs say it does.
| -rwxr-xr-x | greypool | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -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; |
