From 81d79cca61b6ab470babce99dfb60de2793bbd43 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 36952f3a12..95eba7beaf 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();