EC_COMP_GET_CUR_PSTATE(3)
π EC_COMP_GET_CUR_PSTATE β bestie's guide to the current pstate π
okay so real talk, this is a page from the Libecoli Programmer's Manual, and it's about one (1) little function that goes hard: ec_comp_get_cur_pstate. β¨
πΈ NAME πΈ
ec_comp_get_cur_pstate β get the current parsing state of completion. literally that's the whole gig. π
π SYNOPSIS π
#include <ecoli/complete.h>
struct ec_pnode * ec_comp_get_cur_pstate(
const struct ec_comp *comp /* The current completion list. */
);
so you include <ecoli/complete.h> and you call it with comp, which is the current completion list. that's the tea. π«Ά
π¦ DESCRIPTION π¦
bestie, listen. this function is designed to be called by a node during the completion process. like, mid-glow-up. π«
here's the vibe: when the library is processing the list of completions for a given input, it builds an incomplete parsing tree before the completion callback even gets invoked. and a node can absolutely use that tree if the completions list depends on what was previously parsed. iykyk. π
the iconic example? the ec_node_once() node. it peeks inside the parsing tree to check if the node is already parsed, and if it is β no completion is issued. periodt. π
β¨ RETURN VALUE β¨
the current parsing state. and it cannot be NULL β so don't even stress about a null check, it's giving reliable. π
π SEE ALSO π
the whole friend group, no cap:
ec_comp_add_item(3)ec_comp_count(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_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 a wrap on the EC_COMP_GET_CUR_PSTATE(3) page from libecoli, dated 2026-06-11 β mwah, slay, go parse something gorgeous. π
β¨ππ¦
π¦ 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