From b0cdfa51618b4ef31d0e9b9a5b974241cc6d206b Mon Sep 17 00:00:00 2001 From: Patryk Obara Date: Thu, 12 Dec 2019 01:59:43 +0100 Subject: [PATCH] Do not print newline after every command This newline is already ommitted from batch files and noecho commands, this change makes the behaviour consistent in interactive mode. Additional newline is a behaviour inherited from MS-DOS, and even still visible in Windows cmd.exe, but all modern DOS implementations, PowerShell, unix terminals, etc - they all prefer consistent behaviour over addtional newline. Also, there's no point in wasting 4% of screen estate just to show empty line. This fixes CLS command, which is now able to properly clean the screen and place prompt in the first line. --- src/shell/shell.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/src/shell/shell.cpp b/src/shell/shell.cpp index 8783f8f2..169d8781 100644 --- a/src/shell/shell.cpp +++ b/src/shell/shell.cpp @@ -358,7 +358,6 @@ void DOS_Shell::Run(void) { if (echo) ShowPrompt(); InputCommand(input_line); ParseLine(input_line); - if (echo && !bf) WriteOut_NoParsing("\n"); } } while (!exit); }