aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl/shell.lua
diff options
context:
space:
mode:
Diffstat (limited to 'util/prosodyctl/shell.lua')
-rw-r--r--util/prosodyctl/shell.lua3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua
index d48a5ef7..ed102d47 100644
--- a/util/prosodyctl/shell.lua
+++ b/util/prosodyctl/shell.lua
@@ -6,6 +6,7 @@ local parse_args = require "prosody.util.argparse".parse;
local unpack = table.unpack or _G.unpack;
local tc = require "prosody.util.termcolours";
local isatty = require "prosody.util.pposix".isatty;
+local term_width = require"prosody.util.human.io".term_width;
local have_readline, readline = pcall(require, "readline");
@@ -29,7 +30,7 @@ local function read_line(prompt_string)
end
local function send_line(client, line)
- client.send(st.stanza("repl-input", { width = os.getenv "COLUMNS" }):text(line));
+ client.send(st.stanza("repl-input", { width = os.getenv "COLUMNS" or term_width() }):text(line));
end
local function repl(client)