aboutsummaryrefslogtreecommitdiffstats
path: root/util/prosodyctl
diff options
context:
space:
mode:
Diffstat (limited to 'util/prosodyctl')
-rw-r--r--util/prosodyctl/shell.lua7
1 files changed, 7 insertions, 0 deletions
diff --git a/util/prosodyctl/shell.lua b/util/prosodyctl/shell.lua
index bbf0c83a..3e98540f 100644
--- a/util/prosodyctl/shell.lua
+++ b/util/prosodyctl/shell.lua
@@ -10,6 +10,10 @@ local adminstream = require "util.adminstream";
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 @@ local function repl(client)
if not line then
print("");
end
+ if have_readline then
+ readline.save_history();
+ end
os.exit();
end
send_line(client, line);