diff util/prosodyctl/shell.lua @ 12529:7dae6d29b71d

prosodyctl shell: Communicate width of terminal to mod_admin_shell This lets it adjust the width of tables to the actual terminal width.
author Kim Alvefur <zash@zash.se>
date Mon, 30 May 2022 15:28:44 +0200
parents bdb9577a4830
children cfdc8cca64d3
line wrap: on
line diff
--- a/util/prosodyctl/shell.lua	Fri May 27 14:54:32 2022 +0200
+++ b/util/prosodyctl/shell.lua	Mon May 30 15:28:44 2022 +0200
@@ -27,7 +27,7 @@
 end
 
 local function send_line(client, line)
-	client.send(st.stanza("repl-input"):text(line));
+	client.send(st.stanza("repl-input", { width = os.getenv "COLUMNS" }):text(line));
 end
 
 local function repl(client)