aboutsummaryrefslogtreecommitdiffstats
path: root/util/human
diff options
context:
space:
mode:
Diffstat (limited to 'util/human')
-rw-r--r--util/human/io.lua2
1 files changed, 2 insertions, 0 deletions
diff --git a/util/human/io.lua b/util/human/io.lua
index 51a95ed5..e4bea63f 100644
--- a/util/human/io.lua
+++ b/util/human/io.lua
@@ -109,6 +109,8 @@ if utf8.len and utf8.offset then
end
local function term_width(default)
+ local env_cols = os.getenv "COLUMNS";
+ if env_cols then return env_cols; end
local stty = io.popen("stty -a");
if not stty then return default; end
local result = stty:read("*a");