From beadcf1f0d9cf8b9c0b14683bf40d27c142d33c5 Mon Sep 17 00:00:00 2001 From: _ov4 Date: Fri, 9 Oct 2026 07:22:42 +0000 Subject: add history load/save --- module-test/line_test.cc | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'module-test/line_test.cc') diff --git a/module-test/line_test.cc b/module-test/line_test.cc index 2ad6f32..a54085c 100644 --- a/module-test/line_test.cc +++ b/module-test/line_test.cc @@ -6,6 +6,8 @@ src/line/cursor.cc \ src/line/getter.cc \ src/history.cc \ + src/path.cc \ + src/util/string.cc \ -std=c++26 -Iinclude -Ithird_party/magic_enum/include \ -O0 -ggdb3 -fno-omit-frame-pointer -fno-inline -D_GLIBCXX_ASSERTIONS \ -o module-test/line_test.out @@ -21,12 +23,15 @@ #include "line/cursor.h" #include "line/getter.h" #include "line/type.h" +#include "history.h" +#include "path.h" using namespace std; using namespace ov4; int main() { + load_history(); while (true) { print("shell $ "); @@ -39,6 +44,8 @@ int main() disable_raw(); cout << "\n\n\n\n" << endl; cout << s << endl; + if (s == "quit") break; } + save_history(); return 0; } -- cgit v1.3.1-4-g156e