# HG changeset patch # User Kim Alvefur # Date 1591083307 -7200 # Node ID 2b015ef8cd06510eb093e0a2428191edba922a6f # Parent c01c39a2c7a29529c29143b1281274076b123c1a util.prosodyctl.shell: Save readline history diff -r c01c39a2c7a2 -r 2b015ef8cd06 util/prosodyctl/shell.lua --- a/util/prosodyctl/shell.lua Tue Jun 02 08:41:05 2020 +0100 +++ b/util/prosodyctl/shell.lua Tue Jun 02 09:35:07 2020 +0200 @@ -10,6 +10,10 @@ if have_readline then readline.set_readline_name("prosody"); + readline.set_options({ + histfile = path.join(prosody.paths.data, ".shell_history"); + ignoredups = true; + }); end local function read_line() @@ -31,6 +35,9 @@ if not line then print(""); end + if have_readline then + readline.save_history(); + end os.exit(); end send_line(client, line);