aboutsummaryrefslogtreecommitdiffstats
path: root/util
diff options
context:
space:
mode:
authorMatthew Wild <mwild1@gmail.com>2025-03-13 11:37:11 +0000
committerMatthew Wild <mwild1@gmail.com>2025-03-13 11:37:11 +0000
commit57d168dd5e2684522df3c268be482430f3682e2b (patch)
treeb3b417ed12241fb7fe9e60b84f3f9c49ff322c99 /util
parent384e3dbea2738e2c9b0c515fb865f1d07fda179e (diff)
downloadprosody-57d168dd5e2684522df3c268be482430f3682e2b.tar.gz
prosody-57d168dd5e2684522df3c268be482430f3682e2b.zip
prosodyctl shell: More reliable detection of REPL/interactive mode (fixes #1895)
Diffstat (limited to 'util')
-rw-r--r--util/prosodyctl/shell.lua6
1 files changed, 3 insertions, 3 deletions
diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua
index d72cf294..31936989 100644
--- a/util/prosodyctl/shell.lua
+++ b/util/prosodyctl/shell.lua
@@ -29,8 +29,8 @@ local function read_line(prompt_string)
end
end
-local function send_line(client, line)
- client.send(st.stanza("repl-input", { width = tostring(term_width()) }):text(line));
+local function send_line(client, line, interactive)
+ client.send(st.stanza("repl-input", { width = tostring(term_width()), repl = interactive == false and "0" or "1" }):text(line));
end
local function repl(client)
@@ -91,7 +91,7 @@ local function start(arg) --luacheck: ignore 212/arg
end
client.events.add_handler("connected", function()
- send_line(client, arg[1]);
+ send_line(client, arg[1], false);
return true;
end, 1);