mirror of
https://github.com/bjc/prosody.git
synced 2025-04-05 22:27:38 +03:00
util.human.io: table: use term_width() to discover terminal width
This commit is contained in:
parent
403acbb836
commit
b5ff6256b6
1 changed files with 1 additions and 1 deletions
|
@ -126,7 +126,7 @@ local function ellipsis(s, width)
|
||||||
end
|
end
|
||||||
|
|
||||||
local function new_table(col_specs, max_width)
|
local function new_table(col_specs, max_width)
|
||||||
max_width = max_width or tonumber(os.getenv("COLUMNS")) or 80;
|
max_width = max_width or term_width(os.getenv("COLUMNS") or 80);
|
||||||
local separator = " | ";
|
local separator = " | ";
|
||||||
|
|
||||||
local widths = {};
|
local widths = {};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue