From bfb91db4f6a580b4f90a511a79185db4aa3f34d3 Mon Sep 17 00:00:00 2001 From: Puck Meerburg Date: Sun, 19 May 2024 14:16:11 +0000 Subject: repl-interacter: save history after entering every line Fixes: https://git.lix.systems/lix-project/lix/issues/328 Change-Id: Iedd79ff5f72e84766ebd234c63856170afc624f0 --- src/libcmd/repl-interacter.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libcmd/repl-interacter.cc') diff --git a/src/libcmd/repl-interacter.cc b/src/libcmd/repl-interacter.cc index 829383add..d3567e021 100644 --- a/src/libcmd/repl-interacter.cc +++ b/src/libcmd/repl-interacter.cc @@ -175,6 +175,8 @@ bool ReadlineLikeInteracter::getLine(std::string & input, ReplPromptType promptT if (!s) return false; + + write_history(historyFile.c_str()); input += s; input += '\n'; return true; -- cgit v1.2.3