From 2f298a1979554e4671ee5a3631ff72c38a3faddf Mon Sep 17 00:00:00 2001 From: Bananymous Date: Mon, 14 Aug 2023 12:26:22 +0300 Subject: [PATCH] Shell: ^A moves cursor to the beginning of line --- userspace/Shell/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/userspace/Shell/main.cpp b/userspace/Shell/main.cpp index 36952f3a..95eba7be 100644 --- a/userspace/Shell/main.cpp +++ b/userspace/Shell/main.cpp @@ -616,6 +616,11 @@ int main(int argc, char** argv) fflush(stdout); } break; + case '\x01': // ^A + col = 0; + fprintf(stdout, "\e[%dG", prompt_length() + 1); + fflush(stdout); + break; case '\x03': // ^C fputc('\n', stdout); print_prompt();