From e0c17d79a1ad84ecb93f6f324b084c29e7fe8b00 Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Wed, 2 Apr 2014 18:24:07 +0200 Subject: [PATCH] Small improvement in handling of the input --- programs/tsh/src/main.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/programs/tsh/src/main.cpp b/programs/tsh/src/main.cpp index 173658f2..8fb81618 100644 --- a/programs/tsh/src/main.cpp +++ b/programs/tsh/src/main.cpp @@ -119,13 +119,13 @@ void pwd_command(const std::vector&){ int main(){ get_console_information(); - char input_buffer[64]; + char input_buffer[128]; std::string current_input; + + print("thor> "); while(true){ - print("thor> "); - - auto c = read_input(input_buffer, 63); + auto c = read_input(input_buffer, 127); if(input_buffer[c-1] == '\n'){ if(c > 1){ @@ -174,6 +174,8 @@ int main(){ } current_input.clear(); + + print("thor> "); } else { input_buffer[c] = '\0';