diff options
author | Eric Leblond <eric@regit.org> | 2013-06-02 12:18:03 +0200 |
---|---|---|
committer | Eric Leblond <eric@regit.org> | 2013-06-08 12:06:22 +0200 |
commit | 5426ae16d828ce5e59a96dee27a0c01ddd3e8023 (patch) | |
tree | 6388cd59c4edbfd6f3e7318aa806c76cf986bb61 /src | |
parent | 725f3bc0faa2f9d1e7843d982f7a9123f635e9f6 (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')
-rw-r--r-- | src/cli.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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)) |