EC_COMPLETE_STRVEC_EXPAND(3)

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

✨ NAME ✨

ec_complete_strvec_expand β€” bestie, this one hands you a brand new string vector, built off the one you gave it, using completion to stretch out all the non-ambiguous tokens into their full value. it's giving glow-up for your tokens πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/complete.h>

struct ec_strvec * ec_complete_strvec_expand(
    const struct ec_node     *node,    /* The grammar graph. */
    enum ec_comp_type         type,    /* Completion item type to consider. */
    const struct ec_strvec   *strvec   /* The input string vector. */
);

like yes she takes three args, and the comments are literally right there telling you what each one is, no gatekeeping here 🫢

  • node β€” the grammar graph, aka the whole vibe map 🌈
  • type β€” the completion item type you want to consider
  • strvec β€” the input string vector, the raw material ✨

πŸŽ€ STRUCTURES πŸŽ€

okay so the enum, and the semicolons are exactly how they ship, don't come for me, I'm just the messenger:

enum ec_comp_type {
      EC_COMP_UNKNOWN;
      EC_COMP_FULL;
      EC_COMP_PARTIAL;
      EC_COMP_ALL;
};

four little icons, four little moods, EC_COMP_UNKNOWN, EC_COMP_FULL, EC_COMP_PARTIAL, EC_COMP_ALL β€” and type up in the synopsis is picking which one of them you're rolling with πŸ’–


🌸 RETURN VALUE 🌸

you get back a new string vector, with all the non-ambiguous tokens expanded. periodt. πŸ‘‘

and if something goes wrong? you get NULL, and errno is set. so check it, bestie, don't just vibe and assume 😭

ngl, NULL is the "it's not giving" outcome here. always check errno when you see it.

πŸ’œ SEE ALSO πŸ’œ

the whole friend group, all of them, no one left out, we don't do that here:

iykyk πŸ”₯


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


okay that's the whole page, and here's the cute lil sign-off: this one lives in the libecoli Programmer's Manual, dated 2026-06-11, and it's the EC_COMPLETE_STRVEC_EXPAND(3) page πŸ’– thanks for reading, go expand some tokens, you ate πŸŽ€βœ¨

πŸ“¦ where this page comes from