ARIF_RL_COMPLETE(3) ARIF User Manual ARIF_RL_COMPLETE(3)

arif_rl_complete - generate Readline completion candidates

#include <arif/arif_rl.h>
char **
arif_rl_complete (
    struct arif_ctx *ctx,
    char            *text,
    int              start,
    int              end
);

The arif_rl_complete() function generates Readline completion candidates for the given text from offset start to end, by querying the input method engine associated with input context ctx.

This function is intended be called from within a custom Readline rl_attempted_completion_function, with arguments text, start and end passed as-is.

Returns NULL when there are no completion candidates. Otherwise, returns an array of NUL-terminated strings of candidate text. NULL denotes the end of the array.

The return value is intended to be used as the return value of an rl_attempted_completion_function. If used otherwise, the array and each of the strings should be deallocated with free() after use.

Copyright (C) 2023 CismonX <admin@cismon.net>

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.

You should have received a copy of the license along with this document. If not, see <https://www.gnu.org/licenses/fdl-1.3.html>.

arif_query(3), arif_fetch(3), readline(3)

January 2, 2023 0.1.0