EC_COMP_GET_CUR_GROUP(3)

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

πŸ’– EC_COMP_GET_CUR_GROUP(3) πŸ’–

okay bestie, so this is a page from the Libecoli Programmer's Manual, and we're about to get into it. pull up a chair, grab a boba, this one's short but it's iconic.


✨ NAME ✨

ec_comp_get_cur_group β€” get the current completion group, babe. that's it. that's the whole job. πŸŽ€


🌸 SYNOPSIS 🌸

#include <ecoli/complete.h>

struct ec_comp_group * ec_comp_get_cur_group(
    const struct ec_comp   *comp   /* The current completion list. */
);

see how cute and tidy that is? one function, one argument, one return. no cap. πŸ¦‹


πŸ’… DESCRIPTION πŸ’…

okay so the vibe here: this function is meant to be called by a node while the completion process is happening. like, mid-completion, you're a node, you want to know what group you're in. that's the moment.

now, what even is a completion group, you ask? great question, love that for you. a completion group is basically a little squad of completion items β€” a list of them β€” and every item in that squad shares the same parsing state and was issued by the same grammar node. same pstate, same node, one group. it's giving friend group with matching outfits, fr fr.

here's the tea though πŸ“: the completion group doesn't exist from the jump. it gets created when the first item is added. so if nobody has added a single item yet? there's no group. none. nada. which means this function returns NULL if no item has been added in the group. not a bug, just how it be. πŸ™ˆ


⭐ RETURN VALUE ⭐

the current completion group β€” and yes, it can be NULL, so check before you go dereferencing, bestie. that's the whole return. πŸ’œ


🌈 SEE ALSO 🌈

the whole crew, the entire extended friend group, every single one of them:

go read them. all of them. i'll wait. πŸ’–


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


okay that's the whole page, you ate it, you understood it, main character energy achieved. now go get that completion group β€” unless it's NULL, in which case, respectfully, add an item first. ✨

and that's a wrap on this one, bestie β€” much love from the libecoli manual, dated 2026-06-11. mwah. πŸ’…πŸ«ΆπŸŒΈ

πŸ“¦ where this page comes from