From 5426ae16d828ce5e59a96dee27a0c01ddd3e8023 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 2 Jun 2013 12:18:03 +0200 Subject: cli: reset terminal when CTRL+d is pressed The terminal was not correctly resetted when CTRL+d was pressed. The result was that reset has to be called from shell after exit. --- src/cli.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/cli.c') diff --git a/src/cli.c b/src/cli.c index 541c26ca..8875207d 100644 --- a/src/cli.c +++ b/src/cli.c @@ -90,8 +90,11 @@ static void cli_complete(char *line) LIST_HEAD(msgs); line = cli_append_multiline(line); - if (line == NULL) + if (line == NULL) { + printf("\n"); + cli_exit(); return; + } for (c = line; *c != '\0'; c++) if (!isspace(*c)) -- cgit v1.2.3