Kernel: Add partial support for shell

We don't handle arrow keys, and the tty does not know how to clear
the screeen :D
This commit is contained in:
Bananymous
2023-04-05 01:30:58 +03:00
parent af0979ec32
commit 4f522d337a
5 changed files with 46 additions and 175 deletions

View File

@@ -19,10 +19,9 @@ namespace Kernel
void rerender_buffer() const;
BAN::Vector<BAN::String> parse_arguments(BAN::StringView) const;
BAN::ErrorOr<void> process_command(const BAN::Vector<BAN::String>&);
void key_event_callback(Input::KeyEvent);
BAN::ErrorOr<void> update_prompt();
private:
private:
BAN::Vector<BAN::String> m_old_buffer;
BAN::Vector<BAN::String> m_buffer;
BAN::String m_prompt_string;

View File

@@ -39,6 +39,7 @@ namespace Kernel
void render_from_buffer(uint32_t x, uint32_t y);
void on_key(Input::KeyEvent);
void do_backspace();
private:
enum class State