EC_COMP_COUNT(3)
β¨ 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:
ec_comp_add_item(3)ec_comp_item_set_str(3)ec_complete(3)ec_comp_get_attrs(3)ec_comp_group_get_attrs(3)ec_comp_iter_next(3)ec_comp_item_get_node(3)ec_comp_iter_first(3)ec_comp_item_get_current(3)ec_comp_group_get_node(3)ec_complete_strvec_expand(3)ec_comp_free(3)ec_comp_get_cur_pstate(3)ec_complete_unknown(3)ec_complete_strvec(3)ec_comp_item_get_grp(3)ec_comp_item_get_type(3)ec_comp_item_get_str(3)ec_comp_item_set_display(3)ec_complete_child(3)ec_comp(3)ec_comp_item_get_display(3)ec_comp_item_get_completion(3)ec_comp_group_get_pstate(3)ec_comp_dump(3)ec_comp_merge(3)ec_comp_item_set_completion(3)ec_comp_get_cur_group(3)
π COPYRIGHT π
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
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms