]> git.tuebingen.mpg.de Git - paraslash.git/blobdiff - interactive.c
New server command: ll to change the log level at runtime.
[paraslash.git] / interactive.c
index 8c4545b476e8f792ea7bba6f88b4e83fb952e540..069c003944ae1801d9ce9e73570ea6f1cea64353 100644 (file)
@@ -805,3 +805,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);
+}