diff options
author | Puck Meerburg <puck@puckipedia.com> | 2024-05-19 14:16:11 +0000 |
---|---|---|
committer | Puck Meerburg <puck@puckipedia.com> | 2024-05-19 22:47:45 +0000 |
commit | bfb91db4f6a580b4f90a511a79185db4aa3f34d3 (patch) | |
tree | bef0d5056ea6277c9ef86d70d401439e8999616e /src/libcmd | |
parent | 40311973a835aceb866b7d4465c286c700a59ad4 (diff) |
repl-interacter: save history after entering every line
Fixes: https://git.lix.systems/lix-project/lix/issues/328
Change-Id: Iedd79ff5f72e84766ebd234c63856170afc624f0
Diffstat (limited to 'src/libcmd')
-rw-r--r-- | src/libcmd/repl-interacter.cc | 2 |
1 files changed, 2 insertions, 0 deletions
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; |