$opt{'signal-stat'} //= exists $SIG{INFO} ? 'INFO' : 'QUIT';
$opt{markers} //= '=avg >31.73v <68.27v +50v |0';
$opt{palette} //= $opt{color} && [31, 90, 32];
+$opt{hidemin} = ($opt{hidemin} || 1) - 1;
$opt{input} = @ARGV && $ARGV[0] =~ m/\A[-0-9]/ ? \@ARGV : undef
and undef $opt{interval};
sub show_lines {
-state $nr = $opt{hidemin} ? $opt{hidemin} - 1 : 0;
+state $nr = $opt{hidemin};
@lines and @lines > $nr or return;
@lines or return;
@lines > $nr or return unless $opt{hidemin};
sub show_stat {
if ($opt{hidemin} or $opt{hidemax}) {
- $opt{hidemin} ||= 1;
- $opt{hidemax} ||= @lines;
- printf '%s of ', sum(grep {length} @values[$opt{hidemin} - 1 .. $opt{hidemax} - 1]) // 0;
+ printf '%s of ', sum(grep { length }
+ @values[$opt{hidemin} .. ($opt{hidemax} || @lines) - 1]
+ ) // 0;
}
if (@order) {
my $total = sum @order;