From: martin f. krafft Date: Fri, 17 Sep 2021 21:30:59 +0000 (+0200) Subject: Include defaults in ctrlact list output X-Git-Url: http://git.99rst.org/?a=commitdiff_plain;h=2063bb00685afbe65c8a474e20dfb57184322b26;p=irssi-scripts.irssi.org.git Include defaults in ctrlact list output Signed-off-by: martin f. krafft --- diff --git a/scripts/ctrlact.pl b/scripts/ctrlact.pl index 1a70a0b..5c49ab8 100644 --- a/scripts/ctrlact.pl +++ b/scripts/ctrlact.pl @@ -331,12 +331,14 @@ sub walk_match_array { } sub get_mappings_table { - my ($arr) = @_; + my ($arr, $fallback) = @_; my @ret = (); while (my ($i, $elem) = each @{$arr}) { push @ret, sprintf("%7d: %-16s %-32s %-9s %-5s (%s)", $i, @{$elem}); } + push @ret, sprintf("%7s: %-16s %-32s %-9s %-5s (%s)", + 'last', '*', '*', from_data_level($fallback), '∞', 'default'); return join("\n", @ret); } @@ -889,9 +891,9 @@ sub cmd_sleep { } sub cmd_list { - info("WINDOW MAPPINGS\n" . get_mappings_table(\@window_thresholds)); - info("CHANNEL MAPPINGS\n" . get_mappings_table(\@channel_thresholds)); - info("QUERY MAPPINGS\n" . get_mappings_table(\@query_thresholds)); + info("WINDOW MAPPINGS\n" . get_mappings_table(\@window_thresholds, $fallback_window_threshold)); + info("CHANNEL MAPPINGS\n" . get_mappings_table(\@channel_thresholds, $fallback_channel_threshold)); + info("QUERY MAPPINGS\n" . get_mappings_table(\@query_thresholds, $fallback_query_threshold)); } sub cmd_query {