From 57d168dd5e2684522df3c268be482430f3682e2b Mon Sep 17 00:00:00 2001 From: Matthew Wild Date: Thu, 13 Mar 2025 11:37:11 +0000 Subject: prosodyctl shell: More reliable detection of REPL/interactive mode (fixes #1895) --- util/prosodyctl/shell.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'util') 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); -- cgit v1.2.3