]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - interactive.c
Merge branch 'refs/heads/t/ll'
[paraslash.git] / interactive.c
index 812a7d5bef8a37bd3ebdbd5a2484b735827a3395..baacdc00bbdc3029052b5f2709e32673fb634557 100644 (file)
@@ -796,3 +796,25 @@ create_matches:
        free(ci.word);
        return ret;
 }
+
+/**
+ * Complete on severity strings.
+ *
+ * \param ci See struct \ref i9e_completer.
+ * \param cr See struct \ref i9e_completer.
+ *
+ * This is used by para_client and para_audioc which need the same completion
+ * primitive for the ll server/audiod command. Both define their own completer
+ * which is implemented as a trivial wrapper that calls this function.
+ */
+void i9e_ll_completer(struct i9e_completion_info *ci,
+               struct i9e_completion_result *cr)
+{
+       char *sev[] = {SEVERITIES, NULL};
+
+       if (ci->word_num != 1) {
+               cr->matches = NULL;
+               return;
+       }
+       i9e_extract_completions(ci->word, sev, &cr->matches);
+}