X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;ds=sidebyside;f=interactive.c;h=209c5a36f70b194308a21d132c14541a46d51025;hb=27879fbdef3653aa7ba66eda97dc7cd731f2ce26;hp=a8197308e8323c8fe78546117cc2e9479df0fbfd;hpb=a1c4cc4b26f72c19e12100d47a9da3c449aab3e7;p=paraslash.git diff --git a/interactive.c b/interactive.c index a8197308..209c5a36 100644 --- a/interactive.c +++ b/interactive.c @@ -45,7 +45,7 @@ static struct i9e_private i9e_private, *i9ep = &i9e_private; * running. * * \return A negative return value of zero means the i9e task terminated. Only - * in this case it is safe to call ie9_close(). + * in this case it is safe to call i9e_close(). */ int i9e_get_error(void) { @@ -556,7 +556,7 @@ __printf_2_3 void i9e_log(int ll, const char* fmt,...) * the given text. If the length of this text exceeds the width of the * terminal, the text is shortened by leaving out a part in the middle. */ -void ie9_print_status_bar(char *buf, unsigned len) +void i9e_print_status_bar(char *buf, unsigned len) { size_t x = i9ep->num_columns, y = (x - 4) / 2; @@ -805,3 +805,21 @@ 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. + */ +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); +}