Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:38:59 +0200] rev 13050
util.prosodyctl.shell: Use new term_width() for width
Kicks in if/when readline hasn't set $COLUMNS, e.g. when using the
`prosodyctl shell command like this` form.
Matthew Wild <mwild1@gmail.com> [Fri, 07 Apr 2023 12:35:39 +0100] rev 13049
util.human.io: table: use term_width() to discover terminal width
Matthew Wild <mwild1@gmail.com> [Fri, 07 Apr 2023 12:33:17 +0100] rev 13048
util.human.io: Add term_width() method to discover the terminal width
This is not standard POSIX, but apparently very widely supported. For
reference: https://www.austingroupbugs.net/view.php?id=1053
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:09:00 +0200] rev 13047
mod_admin_shell: Make IP column thinner if IPv6 is disabled
IPv6 addresses can be pretty long, so if they can be more compact,
that's nice.
But nobody would disable IPv6, would they?
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:07:00 +0200] rev 13046
mod_admin_shell: Make default column width 1 part
These gets used for usernames, resources and other random session fields
that don't have a column definition in `available_columns`
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:04:15 +0200] rev 13045
mod_admin_shell: Fix attempt to compare number with string
Missed the # in 93c1590b5951
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:02:20 +0200] rev 13044
util.human.io: Pass the whole column definition to mapper function
I forget why I wanted this, but it may allow doing things like pull
settings from the column, especially when the mapper function is reused
among many columns.
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:00:58 +0200] rev 13043
util.human.io: Allow defining per column ellipsis function
As an alternative to doing it in the mapper function. Could be useful in
cases where one may want to put the ellipsis in the middle or beginning
instead of the start.
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:00:00 +0200] rev 13042
util.human.io: Pass expected width to mapper function
In order to allow it to adjust its output to available space, apply its
own ellipsis method or other compacting method.
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 12:58:02 +0200] rev 13041
mod_admin_shell: Dynamically size JIDs and hosts
Reasoning: a hostname is one part, a JID is 3 parts.