summaryrefslogtreecommitdiffstats
path: root/src/cli.c
diff options
context:
space:
mode:
authorEric Leblond <eric@regit.org>2013-06-02 12:03:13 +0200
committerEric Leblond <eric@regit.org>2013-06-08 12:06:22 +0200
commit725f3bc0faa2f9d1e7843d982f7a9123f635e9f6 (patch)
tree98e7e4655950d9c9e0a5cc573f7a4fc7848be9fc /src/cli.c
parent7c7d313751d34e0e83be82d7b0e74b5bdf2364d1 (diff)
cli: add quit command
Diffstat (limited to 'src/cli.c')
-rw-r--r--src/cli.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/cli.c b/src/cli.c
index a5a891e2..541c26ca 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -99,6 +99,11 @@ static void cli_complete(char *line)
if (*c == '\0')
return;
+ if (!strcmp(line, "quit")) {
+ cli_exit();
+ exit(0);
+ }
+
/* avoid duplicate history entries */
hist = history_get(history_length);
if (hist == NULL || strcmp(hist->line, line))