summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.c
diff options
context:
space:
mode:
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r--cli/src/cli.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index fe533071858..1d500c1abbf 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -328,6 +328,11 @@ cli_opt_parse (char *opt, struct cli_state *state)
{
char *oarg;
+ if (strcmp (opt, "version") == 0) {
+ puts (argp_program_version);
+ exit (0);
+ }
+
oarg = strtail (opt, "mode=");
if (oarg) {
if (strcmp (oarg, "script") == 0) {