cli: print_text_table: ensure default is not undefined

Default to printing '', if no default is provided for a column.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
This commit is contained in:
Stoiko Ivanov 2018-06-20 13:28:36 +02:00 committed by Thomas Lamprecht
parent f6c4a56381
commit eb3dae233f

View File

@ -448,7 +448,7 @@ sub print_text_table {
push @keys, $key;
push @titles, $title;
$defaults{$key} = $default;
$defaults{$key} = $default // '';
# calculate maximal print width and cutoff
my $titlelen = length($title);