Fri, 07 Apr 2023 14:14:53 +0100 util.human.io: Add parse_duration() method to parse a duration string
Matthew Wild <mwild1@gmail.com> [Fri, 07 Apr 2023 14:14:53 +0100] rev 13058
util.human.io: Add parse_duration() method to parse a duration string Similar logic occurs throughout various modules in the codebase. We might even want a module:get_option_duration()??
Fri, 07 Apr 2023 14:03:24 +0200 mod_admin_shell: Allow "*" as substitute for 'nil' for easier CLI usage
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 14:03:24 +0200] rev 13057
mod_admin_shell: Allow "*" as substitute for 'nil' for easier CLI usage Since prosodyctl shell with additional arguments assumes the first two are a section:command() and any following arguments are strings, passing a bare 'nil' is not possible. In order to avoid delving into this rabbit hole, instead produce a token that alone is not really a legal JID for use as wildcard.
Fri, 07 Apr 2023 13:58:39 +0200 util.prosodyctl.shell: Fix sending terminal width with single argument
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:58:39 +0200] rev 13056
util.prosodyctl.shell: Fix sending terminal width with single argument E.g. when you do 'prosodyctl shell "s2s:show()"', this is the case that triggers, and it was missing the @width argument, causing confusion.
Fri, 07 Apr 2023 13:54:16 +0200 util.human.io: Coerce $COLUMNS to number
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:54:16 +0200] rev 13055
util.human.io: Coerce $COLUMNS to number os.getenv() returns a string but term_width() should return a number
Fri, 07 Apr 2023 13:53:40 +0200 util.prosodyctl.shell: Coerce terminal width to string (for util.stanza)
Kim Alvefur <zash@zash.se> [Fri, 07 Apr 2023 13:53:40 +0200] rev 13054
util.prosodyctl.shell: Coerce terminal width to string (for util.stanza) Fixes invalid attribute value: expected string, got number
Fri, 07 Apr 2023 12:51:26 +0100 util.human.io: table: don't read $COLUMNS directly, just use term_width()
Matthew Wild <mwild1@gmail.com> [Fri, 07 Apr 2023 12:51:26 +0100] rev 13053
util.human.io: table: don't read $COLUMNS directly, just use term_width() ...which now reads $COLUMNS for us and does the right thing.
Fri, 07 Apr 2023 12:47:24 +0100 util.human.io: table: Return determined width as a second result
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).
Fri, 07 Apr 2023 13:42:20 +0200 util.human.io: Prefer using the $COLUMNS environment variable if set (by readline)
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.
Fri, 07 Apr 2023 13:38:59 +0200 util.prosodyctl.shell: Use new term_width() for width
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.
Fri, 07 Apr 2023 12:35:39 +0100 util.human.io: table: use term_width() to discover terminal width
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
(0) -10000 -3000 -1000 -300 -100 -10 +10 +100 +300 tip