EC_COMP_COUNT(3)

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

✨ EC_COMP_COUNT ✨

okay bestie, so this one lives in the Libecoli Programmer's Manual, and it's genuinely one of the most useful little functions in the whole ecoli universe. it's ec_comp_count, and it's giving "how many of these things actually match?" energy πŸ’…


🌸 SYNOPSIS 🌸

#include <ecoli/complete.h>

size_t ec_comp_count(
    const struct ec_comp   *comp,  /* The completion list. */
    /*
     * A logical OR of flags among EC_COMP_UNKNOWN, EC_COMP_PARTIAL
     * and EC_COMP_FULL, to select the type to match.
     */
    enum ec_comp_type       type
);

so you hand it a completion list (comp, which is The completion list), and then type, which is a logical OR of flags β€” the options being EC_COMP_UNKNOWN, EC_COMP_PARTIAL, and EC_COMP_FULL β€” and that's what picks which type you're matching against. slay πŸŽ€


πŸ’– DESCRIPTION πŸ’–

okay so here's the whole vibe: ec_comp_count returns the number of completion items that match a given type in a completion list. that's it. that's the function. no cap, it's a counter and it knows exactly what it is πŸ‘‘


πŸ¦‹ STRUCTURES πŸ¦‹

here's the enum you'll be passing around, in all its glory:

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

not me noticing EC_COMP_ALL is in the enum but not in that OR list up in the synopsis β€” anyway, i'm just telling you what's here, bestie πŸ™ˆ


⭐ RETURN VALUE ⭐

the number of matching items. literally just a count, size_t flavored, iconic behavior ✨


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr β€” go read all of these:


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


and that's the whole page, bestie 🫢 this came to you courtesy of libecoli, dated 2026-06-11 β€” take care of her, she's doing her best πŸ’œ

πŸ“¦ where this page comes from