diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-09 07:22:42 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-09 07:22:42 +0000 |
| commit | beadcf1f0d9cf8b9c0b14683bf40d27c142d33c5 (patch) | |
| tree | c996d716cad78bb24870996d751715e8387d3024 /include | |
| parent | 091db10e0f5e8e95095f30cef34d51e23fc01abb (diff) | |
add history load/save
Diffstat (limited to 'include')
| -rw-r--r-- | include/history.h | 7 | ||||
| -rw-r--r-- | include/path.h | 4 |
2 files changed, 9 insertions, 2 deletions
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 <string> #include <vector> +#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 <iterator> #include <iostream> -#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(); + } |
