Matthew Wild <mwild1@gmail.com> [Fri, 07 Apr 2023 12:47:24 +0100] rev 13052
util.human.io: table: Return determined width as a second result
This allows callers to adjust other things based on the width of the rows
(such as header lines).
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:42:20 +0200] rev 13051
util.human.io: Prefer using the $COLUMNS environment variable if set (by readline)
Feels like it should be faster.
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.