EC_COMPLETE(3)

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

πŸ’– EC_COMPLETE πŸ’–

okay bestie, so this is a page from the Libecoli Programmer's Manual, and it's all about ec_complete β€” the function that pulls your completion list out of a plain string. get comfy, we're doing this πŸ’…


✨ NAME ✨

ec_complete β€” literally just "gimme the list of completions from a string input." that's the whole gig πŸŽ€


🌸 SYNOPSIS 🌸

#include <ecoli/complete.h>

struct ec_comp * ec_complete(
    const struct ec_node   *node,  /* The grammar graph. */
    const char             *str    /* The input string. */
);

πŸ¦‹ DESCRIPTION πŸ¦‹

so the way this works is: ec_complete() is equivalent to calling ec_complete_strvec() with a vector that only contains 1 element β€” that element being the input string. periodt. no cap.

and honestly? using this one is often more convenient if you're getting your input from a buffer, because then you don't have to go build a whole vector yourself. slay, less work 🫢

usually what that means is you've got a lexer hanging out in your grammar graph that's gonna tokenize the input for you. iconic behaviour honestly.

for the full deets, go read ec_complete_strvec() β€” that's where the details live. iykyk.


⭐ RETURN VALUE ⭐

  • on success? you get a pointer to the completion list. chef's kiss πŸ‘‘
  • on error? you get NULL, and errno gets set. (the vibe check failed, bestie 😭)

πŸ’œ SEE ALSO πŸ’œ

the whole friend group, fr fr:


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


okay that's the whole page, bestie!! this one came from libecoli, dated 2026-06-11 β€” like, it's giving timeless, it's giving maintained πŸ§šπŸ’– go forth and complete ur strings, mwah πŸ’œβœ¨

πŸ“¦ where this page comes from