sh: remove duplicate code
This commit is contained in:
parent
fef7dd5867
commit
4aa979bd87
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user