ARIF_RL_COMPLETE(3)

πŸ“¦ version 0.3.0, in alpine 3.24

πŸŽ€ NAME πŸŽ€

Okay bestie, welcome to arif_rl_complete(3) from the ARIF User Manual β€” the function that generates Readline completion candidates ✨

✨ SYNOPSIS ✨

#include <arif_rl.h>

char **
arif_rl_complete (
    struct arif_ctx *ctx,
    char            *text,
    int              start,
    int              end
);

πŸ’… DESCRIPTION πŸ’…

So arif_rl_complete() generates Readline completion candidates for the given text, from offset start to end. How? By querying the input method engine associated with the input context ctx, periodt πŸ’–

This function is intended to be called from inside a custom Readline rl_attempted_completion_function, with the arguments text, start, and end passed as-is. No cap, that's literally the setup 🫢

🫢 RETURN VALUES 🫢

  • Returns NULL when there are no completion candidates β€” yes, zero candidates, zero drama πŸ’€
  • Otherwise, it 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 you use it otherwise, the array and each of the strings should be deallocated with free(3) after use. Clean up after yourself, bestie 🧚

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.

πŸ¦‹ SEE ALSO πŸ¦‹


That's the whole page, bestie β€” version 0.1.0, dated Jan 02, 2023. Stay iconic, call your completion function safely, and mwah πŸ’‹πŸŒˆ

πŸ“¦ where this page comes from