diff options
author | Linus Groh <mail@linusgroh.de> | 2020-10-25 23:25:41 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2020-10-26 11:27:54 +0100 |
commit | b2e4fe1299bd57b4ab4bb7ea0e0133038db52b26 (patch) | |
tree | 991fa54dd3333d8fc502d7cc9a6cfb55cbf18e52 /Shell/Shell.h | |
parent | af056718437f23e895f45e9b6c473d37a3e5f699 (diff) | |
download | serenity-b2e4fe1299bd57b4ab4bb7ea0e0133038db52b26.zip |
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.
Diffstat (limited to 'Shell/Shell.h')
-rw-r--r-- | Shell/Shell.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Shell/Shell.h b/Shell/Shell.h index 4f61942fe8..d485979c73 100644 --- a/Shell/Shell.h +++ b/Shell/Shell.h @@ -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(); |