1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 06:28:13 +00:00

Shell: Implement support for terminal clearing with ^L.

Make LineEditor::get_line() responsible for printing the prompt. That way
we can re-prompt after clearing the screen on ^L.

This makes the Serenity Terminal feel a little bit more like home :^)
This commit is contained in:
Andreas Kling 2019-07-19 20:01:46 +02:00
parent 2d4d465206
commit 253e391bfc
3 changed files with 23 additions and 11 deletions

View file

@ -8,7 +8,7 @@ public:
LineEditor();
~LineEditor();
String get_line();
String get_line(const String& prompt);
void add_to_history(const String&);
const Vector<String>& history() const { return m_history; }