From b2e4fe1299bd57b4ab4bb7ea0e0133038db52b26 Mon Sep 17 00:00:00 2001 From: Linus Groh Date: Sun, 25 Oct 2020 23:25:41 +0000 Subject: Shell+LibLine: Move Shell::{load,save}_history() to Line::Editor This allows us to easily re-use history loading and saving in other programs using Line::Editor, as well as implementing universally recognized HISTCONTROL. --- Shell/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Shell/main.cpp') diff --git a/Shell/main.cpp b/Shell/main.cpp index 4ab4805a5b..cc2c08d308 100644 --- a/Shell/main.cpp +++ b/Shell/main.cpp @@ -57,7 +57,7 @@ int main(int argc, char** argv) for (auto& it : s_shell->jobs) s_shell->kill_job(it.value.ptr(), SIGHUP); - s_shell->save_history(); + s_shell->editor()->save_history(s_shell->get_history_path()); }); editor = Line::Editor::construct(); -- cgit v1.2.3