comparison util/prosodyctl/shell.lua @ 13052:585bd71a1a97

util.prosodyctl.shell: Fix sending terminal width with single argument E.g. when you do 'prosodyctl shell "s2s:show()"', this is the case that triggers, and it was missing the @width argument, causing confusion.
author Kim Alvefur <zash@zash.se>
date Fri, 07 Apr 2023 13:58:39 +0200
parents 4ae759490e31
children 16413bc29361
comparison
equal deleted inserted replaced
13051:164c2787901a 13052:585bd71a1a97
83 -- prosodyctl shell module reload foo bar.com --> module:reload("foo", "bar.com") 83 -- prosodyctl shell module reload foo bar.com --> module:reload("foo", "bar.com")
84 arg[1] = string.format("%s:%s("..string.rep("%q", #arg-2,", ")..")", unpack(arg)); 84 arg[1] = string.format("%s:%s("..string.rep("%q", #arg-2,", ")..")", unpack(arg));
85 end 85 end
86 86
87 client.events.add_handler("connected", function() 87 client.events.add_handler("connected", function()
88 client.send(st.stanza("repl-input"):text(arg[1])); 88 send_line(client, arg[1]);
89 return true; 89 return true;
90 end, 1); 90 end, 1);
91 91
92 local errors = 0; -- TODO This is weird, but works for now. 92 local errors = 0; -- TODO This is weird, but works for now.
93 client.events.add_handler("received", function(stanza) 93 client.events.add_handler("received", function(stanza)