diff options
-rw-r--r-- | interactive.c | 4 | ||||
-rw-r--r-- | shed_commands.c | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/interactive.c b/interactive.c index 545a52d..239c001 100644 --- a/interactive.c +++ b/interactive.c @@ -39,6 +39,10 @@ int sh_interactive(void) return 0; } + if (strlen(ed.cur->buf) == 0) { + continue; + } + struct command *command = sh_parse(ed.cur->buf); if (command) { sh_execute(command); diff --git a/shed_commands.c b/shed_commands.c index adf31ab..51b986b 100644 --- a/shed_commands.c +++ b/shed_commands.c @@ -30,7 +30,7 @@ int shed_backspace(struct shed *e) int shed_cancel(struct shed *e) { struct buffer *b = e->cur; - write(STDOUT_FILENO, "^C", 2); + write(STDOUT_FILENO, "^C\n", 3); b->nread = 0; return 0; } |