:: commit eb0dfb155e5f7c65bc0659b87a2860fefb76fb68

czapek1337 <czapek1337@gmail.com> — 2022-01-28 22:56

parents: 8bf716696c

console: Add a clear command

diff --git a/stage23/console.c b/stage23/console.c
index 49a165b0..f810d196 100644
--- a/stage23/console.c
+++ b/stage23/console.c
@@ -13,6 +13,7 @@ static void console_help(void) {
     print(
         "Available commands:\n"
         "exit      -- Exit Limine console.\n"
+        "clear     -- Clears the console.\n"
         "editor    -- Open an empty boot entry editor.\n"
         "version   -- Print version.\n"
         "copyright -- Print copyright.\n"
@@ -33,6 +34,8 @@ void console(void) {
             console_help();
         } else if (strcmp(prompt, "exit") == 0) {
             break;
+        } else if (strcmp(prompt, "clear") == 0) {
+            reset_term();
         } else if (strcmp(prompt, "editor") == 0) {
             char *new_entry = config_entry_editor("New Entry", "");
             if (new_entry != NULL) {
tab: 248 wrap: offon