client: Add completer for version command.
authorAndre Noll <maan@tuebingen.mpg.de>
Sat, 2 Jan 2016 17:41:37 +0000 (17:41 +0000)
committerAndre Noll <maan@tuebingen.mpg.de>
Sun, 28 Feb 2016 13:15:10 +0000 (14:15 +0100)
This command gained the -v flag but the commit that introduced it
last year (26dc18b2, Unify version command handlers) missed to provide
the corresponding completer for para_client.

client.c

index 35b49a168d5b0d680603e087ed7e6bcf3d309d9e..34cc9189bb2a1768765be83a5edaf5c0e2be7f5d 100644 (file)
--- a/client.c
+++ b/client.c
@@ -204,7 +204,6 @@ I9E_DUMMY_COMPLETER(pause);
 I9E_DUMMY_COMPLETER(play);
 I9E_DUMMY_COMPLETER(si);
 I9E_DUMMY_COMPLETER(term);
-I9E_DUMMY_COMPLETER(version);
 I9E_DUMMY_COMPLETER(stop);
 I9E_DUMMY_COMPLETER(addatt);
 I9E_DUMMY_COMPLETER(init);
@@ -218,6 +217,13 @@ static void help_completer(struct i9e_completion_info *ci,
        result->matches = i9e_complete_commands(ci->word, completers);
 }
 
+static void version_completer(struct i9e_completion_info *ci,
+               struct i9e_completion_result *cr)
+{
+       char *opts[] = {"-v", NULL};
+       i9e_complete_option(opts, ci, cr);
+}
+
 static void stat_completer(struct i9e_completion_info *ci,
                struct i9e_completion_result *cr)
 {