Software /
code /
prosody
Diff
util/human/io.lua @ 13049:115ce3ab5b8b
util.human.io: table: don't read $COLUMNS directly, just use term_width()
...which now reads $COLUMNS for us and does the right thing.
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Fri, 07 Apr 2023 12:51:26 +0100 |
parent | 13048:946442df65d3 |
child | 13051:164c2787901a |
line wrap: on
line diff
--- a/util/human/io.lua Fri Apr 07 12:47:24 2023 +0100 +++ b/util/human/io.lua Fri Apr 07 12:51:26 2023 +0100 @@ -128,7 +128,7 @@ end local function new_table(col_specs, max_width) - max_width = max_width or term_width(os.getenv("COLUMNS") or 80); + max_width = max_width or term_width(80); local separator = " | "; local widths = {};