mirror of https://github.com/digint/btrbk
btrbk: print_formatted(): honor use_header argument for all table formats
parent
9afe17f738
commit
1151d2c572
22
btrbk
22
btrbk
|
@ -3059,19 +3059,21 @@ sub print_formatted(@)
|
|||
}
|
||||
|
||||
# print keys (headings)
|
||||
my $fill = 0;
|
||||
foreach (@$keys) {
|
||||
print $fh ' ' x $fill;
|
||||
$fill = $maxlen{$_} - length($_);
|
||||
if($ralign->{$_}) {
|
||||
unless($args{no_header}) {
|
||||
my $fill = 0;
|
||||
foreach (@$keys) {
|
||||
print $fh ' ' x $fill;
|
||||
$fill = 0;
|
||||
$fill = $maxlen{$_} - length($_);
|
||||
if($ralign->{$_}) {
|
||||
print $fh ' ' x $fill;
|
||||
$fill = 0;
|
||||
}
|
||||
print $fh $_;
|
||||
$fill += $table_spacing;
|
||||
}
|
||||
print $fh $_;
|
||||
$fill += $table_spacing;
|
||||
print $fh "\n";
|
||||
print $fh join(' ' x $table_spacing, map { '-' x ($maxlen{$_}) } @$keys) . "\n";
|
||||
}
|
||||
print $fh "\n";
|
||||
print $fh join(' ' x $table_spacing, map { '-' x ($maxlen{$_}) } @$keys) . "\n";
|
||||
|
||||
# print values
|
||||
foreach my $row (@$data) {
|
||||
|
|
Loading…
Reference in New Issue