From 4aa979bd87bf212e6cb83f364578ad5cf7e79d99 Mon Sep 17 00:00:00 2001 From: apio Date: Sat, 22 Oct 2022 15:08:27 +0200 Subject: [PATCH] sh: remove duplicate code --- apps/src/sh.c | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/apps/src/sh.c b/apps/src/sh.c index e1d0caef..39b41041 100644 --- a/apps/src/sh.c +++ b/apps/src/sh.c @@ -148,16 +148,10 @@ void command_concat_char(command* cmd, char c) } else if (c == '\n') { - if (cmd->size == 0) - { - putchar(c); - show_prompt(); - } + putchar(c); + if (cmd->size == 0) show_prompt(); else - { - putchar(c); command_execute(cmd); - } } else {