X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=interactive.c;h=069c003944ae1801d9ce9e73570ea6f1cea64353;hb=15fde2fd9f9e668b267ab4cfd9fc10db37804dcf;hp=8c4545b476e8f792ea7bba6f88b4e83fb952e540;hpb=b624392bcbc6aec9836ded20b7776f42408bd84d;p=paraslash.git diff --git a/interactive.c b/interactive.c index 8c4545b4..069c0039 100644 --- a/interactive.c +++ b/interactive.c @@ -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); +}