sh: remove duplicate code

This commit is contained in:
apio 2022-10-22 15:08:27 +02:00
parent fef7dd5867
commit 4aa979bd87

View File

@ -147,18 +147,12 @@ void command_concat_char(command* cmd, char c)
} }
} }
else if (c == '\n') else if (c == '\n')
{
if (cmd->size == 0)
{ {
putchar(c); putchar(c);
show_prompt(); if (cmd->size == 0) show_prompt();
}
else else
{
putchar(c);
command_execute(cmd); command_execute(cmd);
} }
}
else else
{ {
putchar(c); putchar(c);