# HG changeset patch # User Matthew Wild # Date 1680867339 -3600 # Node ID da0b3cb9a2ec9ff44dc3d26bf313997b80f1f1c0 # Parent 5bd2720953886bfd22b82fdab6a9a24af1ca56c2 util.human.io: table: use term_width() to discover terminal width diff -r 5bd272095388 -r da0b3cb9a2ec util/human/io.lua --- a/util/human/io.lua Fri Apr 07 12:33:17 2023 +0100 +++ b/util/human/io.lua Fri Apr 07 12:35:39 2023 +0100 @@ -126,7 +126,7 @@ end 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 widths = {};