From 725f3bc0faa2f9d1e7843d982f7a9123f635e9f6 Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Sun, 2 Jun 2013 12:03:13 +0200 Subject: cli: add quit command --- src/cli.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/cli.c') 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)) -- cgit v1.2.3