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 --- include/history.h | 7 +++++++ include/path.h | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/history.h b/include/history.h index a4966e2..8b7a4bb 100644 --- a/include/history.h +++ b/include/history.h @@ -3,6 +3,8 @@ #include #include +#include "path.h" + namespace ov4 { @@ -15,4 +17,9 @@ void clear_history(); std::size_t get_last_index(); +std::string get_default_history_path(); + +void load_history(const std::string &path = get_default_history_path()); +void save_history(const std::string &path = get_default_history_path()); + } diff --git a/include/path.h b/include/path.h index c5f0d2b..d168581 100644 --- a/include/path.h +++ b/include/path.h @@ -7,8 +7,6 @@ #include #include -#include "all.h" - namespace ov4 { @@ -19,4 +17,6 @@ std::string path_unifier(const std::string &s, bool is_cmd = false); std::string get_current_dir(); int set_current_dir(const std::string &s); +std::string get_home_dir(); + } -- cgit v1.3.1-4-g156e