git.shiar.nl
/
barcat.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
763e9e7
)
color default depends on stdout being isatty
author
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 5 Sep 2019 16:06:53 +0000
(18:06 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Thu, 5 Sep 2019 21:56:49 +0000
(23:56 +0200)
graph
patch
|
blob
|
history
diff --git
a/graph
b/graph
index 423f5cbede3cb3881f3401dd1b93070aa236b97e..14b717310a819c4272fd1cf4911f5ff6432feea5 100755
(executable)
--- a/
graph
+++ b/
graph
@@
-18,8
+18,9
@@
GetOptions(\my %opt,
'usage|h' => sub { podexit() },
'help' => sub { podexit(-verbose => 2) },
) or exit 64; # EX_USAGE
'usage|h' => sub { podexit() },
'help' => sub { podexit(-verbose => 2) },
) or exit 64; # EX_USAGE
+
$opt{width} ||= $ENV{COLUMNS} || 80;
$opt{width} ||= $ENV{COLUMNS} || 80;
-$opt{color} //=
1;
+$opt{color} //=
-t *STDOUT; # enable on tty
if (defined $opt{follow}) {
$opt{follow} ||= 1;
if (defined $opt{follow}) {
$opt{follow} ||= 1;
@@
-108,9
+109,11
@@
Each line starting with a number is given a bar to visualise relative sizes.
=over
=over
-=item -
-no-
color
+=item -
c, --[no-]
color
-Disable colored output of values and bar markers.
+Force colored output of values and bar markers.
+Defaults on if output is a tty,
+disabled otherwise such as when piped or redirected.
=item -f, --follow[=<seconds>]
=item -f, --follow[=<seconds>]