Software /
code /
prosody
Diff
util/prosodyctl/shell.lua @ 10877:2b015ef8cd06
util.prosodyctl.shell: Save readline history
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Tue, 02 Jun 2020 09:35:07 +0200 |
parent | 10875:09674bbb833f |
child | 10937:d86f59c31458 |
line wrap: on
line diff
--- 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);