diff --git a/ChangeLog b/ChangeLog index 497e13d..0f16614 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,10 @@ btrbk-current rate_limit_remote is set. - In order to mimic old behavior, replace rate_limit with rate_limit_remote, and read btrbk.conf(5). + - If you are using table output other than --format=raw in your + scripts, note that the column headings changed from pretty + two-line to (uppercase) one-line format. Either add --pretty + option to mimic old behavior, or adapt your scripts. * Dropped run-time dependency on "pv" (in favor of "mbuffer"). * Combined stream_buffer and rate_limit: for rate_limit, use "mbuffer" (on local host) instead of "pv" (on source host). diff --git a/btrbk b/btrbk index 454497d..1262408 100755 --- a/btrbk +++ b/btrbk @@ -286,6 +286,7 @@ my @exclude_vf; my $do_dumper; my $show_progress = 0; my $output_format; +my $output_pretty = 0; my $lockfile; my $tlog_fh; my $syslog_enabled = 0; @@ -4673,7 +4674,7 @@ sub print_formatted(@) my %args = @_; my $title = $args{title}; my $format = $args{output_format} || $output_format || $default_format; - my $pretty = $args{pretty}; + my $pretty = $args{pretty} // $output_pretty; my $key_defs = $table_formats{$format_key}->{$format}; my $ralign = $table_formats{$format_key}->{RALIGN} // {}; my $fh = $args{outfile} // *STDOUT; @@ -4943,6 +4944,7 @@ MAIN: 'table|t' => sub { $output_format = "table" }, 'long|L' => sub { $output_format = "long" }, 'format=s' => \$output_format, + 'pretty' => \$output_pretty, 'print-schedule|S' => \$print_schedule, 'lockfile=s' => \$lockfile_cmdline, 'override=s' => \@config_override_cmdline, # e.g. --override=incremental=no diff --git a/doc/btrbk.1.asciidoc b/doc/btrbk.1.asciidoc index ec818f5..cb2def5 100644 --- a/doc/btrbk.1.asciidoc +++ b/doc/btrbk.1.asciidoc @@ -20,7 +20,7 @@ btrbk [-h|--help] [--version] [-c|--config ] [-n|--dry-run] [--exclude ] [-p|--preserve] [--preserve-snapshots] [--preserve-backups] [-v|--verbose] [-q|--quiet] [-l|--loglevel ] - [-t|--table] [--format ] + [-t|--table] [--format ] [--pretty] [-S|--print-schedule] [--progress] [--lockfile ] [--override =] @@ -126,6 +126,10 @@ OPTIONS output format for *run*, *snapshot*, *resume*, *prune*, *archive* and *list* commands. Useful for further exporting/scripting. +--pretty:: + Print table output with lowercase, underlined column headings + (instead of single-line uppercase headings). + -S, --print-schedule:: Print detailed scheduler information on *run*, *snapshot*, *resume*, *prune* and *archive* commands. Use the '--format'