X-Git-Url: http://git.shiar.nl/barcat.git/blobdiff_plain/86ddf3f48f705f0865390bebbef9beeacec97aa4..b0dd9c1ee3383d5a611c0046765470cf003c2c76:/barcat diff --git a/barcat b/barcat index 2acdadd..804b3b0 100755 --- a/barcat +++ b/barcat @@ -101,7 +101,7 @@ GetOptions(\%opt, }, ) or exit 64; # EX_USAGE -$opt{width} ||= $ENV{COLUMNS} || 80; +$opt{width} ||= $ENV{COLUMNS} || qx(tput cols) || 80; $opt{color} //= -t *STDOUT; # enable on tty $opt{'graph-format'} //= '-'; $opt{trim} *= $opt{width} / 100 if $opt{trimpct};