From db8cc1cd14e5139fbad796ba96bfd8cbe27e18e2 Mon Sep 17 00:00:00 2001 From: Axel Burri Date: Sun, 14 Feb 2021 15:30:46 +0100 Subject: [PATCH] btrbk: collapse empty column in total of action "stats" --- btrbk | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/btrbk b/btrbk index 38c7696..4be3a86 100755 --- a/btrbk +++ b/btrbk @@ -6820,14 +6820,14 @@ MAIN: if($action_resolve eq "stats") { my $filter = $config->{CMDLINE_FILTER_LIST} ? " (" . join(", ", @{$config->{CMDLINE_FILTER_LIST}}) . ")" : ""; my @backup_total = map { $stats{$_} ? "$stats{$_} $_" : () } qw( correlated incomplete ); - my $bflags = @backup_total ? "(" . join(', ', @backup_total) . ")" : ""; + my $bflags = @backup_total ? "(" . join(', ', @backup_total) . ")" : undef; print_formatted("stats", \@data, paragraph => 1); print "Total${filter}:\n"; - print_formatted({ table => [ qw( a b c ) ], RALIGN => { a=>1 } }, - [ { a => $stats{snapshots}, b => "snapshots", c => " " }, + print_formatted({ table => [ qw( a b -c ) ], RALIGN => { a=>1 } }, + [ { a => $stats{snapshots}, b => "snapshots" }, { a => $stats{backups}, b => "backups", c => $bflags } ], - output_format => "table", no_header => 1); + output_format => "table", no_header => 1, empty_cell_char => ""); } elsif($action_resolve eq "snapshots") { print_formatted("snapshots", \@data);