X-Git-Url: http://git.shiar.net/barcat.git/blobdiff_plain/43511a9c8cfbb436926aec1c4382003cdab87ee5..a279033b56c8f8a25da16c7b57c38cfa01452dbf:/barcat diff --git a/barcat b/barcat index db0aefa..4f72356 100755 --- a/barcat +++ b/barcat @@ -42,6 +42,7 @@ GetOptions(\%opt, " (range expected)\n" ); }, + 'header!', 'markers|m=s', 'graph-format=s' => sub { $opt{'graph-format'} = substr $_[1], 0, 1; @@ -192,6 +193,14 @@ sub sival { ); } +say( + color(31), sprintf('%*s', $lenval, $minval), + color(90), '-', color(36), '+', + color(32), sprintf('%*s', $size * ($maxval - $minval) - 3, $maxval), + color(90), '-', color(36), '+', + color(0), +) if $opt{header}; + while ($nr <= $#lines) { $nr >= $opt{hidemax} and last if defined $opt{hidemax}; my $val = $values[$nr]; @@ -294,6 +303,10 @@ A string can indicate the starting position of a value or capture the numbers itself, for example I<-f'(\d+)'> for the first digits anywhere. +=item --header + +Prepend a chart axis with minimum and maximum values labeled. + =item -H, --human-readable Format values using SI unit prefixes,