EC_INTERACT_GET_COMPLETIONS(3)

πŸ“¦
version 0.11.7 Β· 4 versions
, in fedora 44

✨ EC_INTERACT_GET_COMPLETIONS(3) ✨

okay bestie, welcome to the Libecoli Programmer's Manual πŸ’– this one's a lil cutie from the ecoli/interact.h corner of the world, and she's here to hand you a whole array of completion matches. no cap.


🌸 NAME 🌸

ec_interact_get_completions β€” get completion matches as an array of strings. that's it, that's the job, and she does it flawlessly πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/interact.h>

ssize_t ec_interact_get_completions(
    /*
     * The completions, as returned by ec_complete().
     */
    const struct ec_comp   *cmpl,
    /*
     * The pointer where the matches array will be returned.
     */
    char *                **matches_out,
    enum ec_comp_type       type_mask
);

ok so like, three args, three vibes:

  • const struct ec_comp *cmpl β€” the completions, literally exactly as returned by ec_complete(). don't get creative with it bestie, just pass what you got.
  • char **matches_out β€” the pointer where the matches array is gonna get returned. she's writing into this, so she needs somewhere to put it 🫢
  • enum ec_comp_type type_mask β€” the mask that says which types you want in on the fun.

⭐ RETURN VALUE ⭐

  • the size of the array on success (that's >= 0) β€” slay, you got matches
  • -1 on error β€” not slay, something went wrong 😭

πŸ’œ SEE ALSO πŸ’œ

the whole friend group, go say hi:


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry. protect it with your life, periodt πŸŽ€


and that's the whole page bestie!! this one shipped as part of libecoli, dated 2026-06-11, and she ate and left no crumbs πŸ¦‹βœ¨ mwah, go compile something gorgeous πŸ’–

πŸ“¦ where this page comes from