1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 05:18:12 +00:00

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.
This commit is contained in:
Linus Groh 2020-10-25 23:25:41 +00:00 committed by Andreas Kling
parent af05671843
commit b2e4fe1299
6 changed files with 36 additions and 31 deletions

View file

@ -109,6 +109,8 @@ public:
String format(const StringView&, ssize_t& cursor) const;
RefPtr<Line::Editor> editor() const { return m_editor; }
struct LocalFrame {
HashMap<String, RefPtr<AST::Value>> local_variables;
};
@ -154,8 +156,6 @@ public:
void kill_job(const Job*, int sig);
String get_history_path();
void load_history();
void save_history();
void print_path(const String& path);
bool read_single_line();