EC_INTERA...END_CHARS(3)

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

✨ EC_INTERA...END_CHARS(3) ✨

okay so bestie, welcome to the Libecoli Programmer's Manual πŸ’– this one's a lil three-parter situation, and we're gonna walk through it together, no cap.


πŸŽ€ NAME πŸŽ€

ec_interact_append_chars β€” she gets you the characters to append to the line for a completion. that's it, that's the job. πŸ’…


🌸 SYNOPSIS 🌸

#include <ecoli/interact.h>

char * ec_interact_append_chars(
    /*
     * The completion object containing all the completion items.
     */
    const struct ec_comp   *cmpl
);

so you're passing in cmpl, which is literally the completion object holding all the completion items. she's const too, so you're not messing with her, just vibing with her data. πŸ¦‹


πŸ’– RETURN VALUE πŸ’–

so what do you get back? an allocated string ✨ β€” one that's meant to be appended to the current line. and listen, this is the important part, bestie:

the caller has to free it with free(). not optional. that's your string now, you own it, you clean it up. 🧹

now, this string can be empty in two cases:

  • there's no completion at all, or
  • the completions start with a different letter (so nothing matches, rip πŸ’€)

and if something goes wrong? it returns NULL. that's the error vibe. 😭


πŸ‘‘ SEE ALSO πŸ‘‘

go read her friends, they're all iconic in their own right:

iykyk 🌈


Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.


and that's the whole page, bestie!! πŸŽ€ huge thanks to the libecoli girlies for this one β€” this page was last touched on 2026-06-11, so you know it's fresh. slay, go complete some lines. periodt πŸ’…βœ¨πŸ’–

πŸ“¦ where this page comes from