From 46f1edad6cf059eaef351f950e2f067c05871563 Mon Sep 17 00:00:00 2001 From: Mischa POSLAWSKY Date: Sat, 27 Mar 2021 22:58:25 +0100 Subject: [PATCH] apply value formatting to statistics --- barcat | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/barcat b/barcat index cc3f607..82f0fff 100755 --- a/barcat +++ b/barcat @@ -326,9 +326,9 @@ sub show_stat { printf ' in %d values', scalar @order; printf ' over %d lines', scalar @lines if @order != @lines; printf(' (%s min, %s avg, %s max)', - color(31) . $order[-1] . color(0), - color(36) . $opt{'calc-format'}->($total / @order) . color(0), - color(32) . $order[0] . color(0), + color(31) . ($opt{'value-format'} || sub {$_[0]})->($order[-1]) . color(0), + color(36) . ($opt{'value-format'} || $opt{'calc-format'})->($total / @order) . color(0), + color(32) . ($opt{'value-format'} || sub {$_[0]})->($order[0]) . color(0), ); } say ''; -- 2.30.0