summaryrefslogtreecommitdiffstats
path: root/src/cli.c
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2013-06-02 12:18:03 +0200
committerEric Leblond <eric@regit.org>2013-06-08 12:06:22 +0200
commit5426ae16d828ce5e59a96dee27a0c01ddd3e8023 (patch)
tree6388cd59c4edbfd6f3e7318aa806c76cf986bb61 /src/cli.c
parent725f3bc0faa2f9d1e7843d982f7a9123f635e9f6 (diff)
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.
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c5
1 files changed, 4 insertions, 1 deletions
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))