ec_complete - Man Page
Get the list of completions from a string input.
Synopsis
#include <ecoli/complete.h>
struct ec_comp * ec_complete(
const struct ec_node *node, /* The grammar graph. */
const char *str /* The input string. */
);Description
It is equivalent to calling ec_complete_strvec() with a vector that only contains 1 element, the input string. Using this function is often more convenient if you get your input from a buffer, because you won't have to create a vector. Usually, it means you have a lexer in your grammar graph that will tokenize the input.
See ec_complete_strvec() for more details.
Return Value
A pointer to the completion list on success, or NULL on error (errno is set).
See Also
ec_comp_add_item(3), ec_comp_count(3), ec_comp_item_set_str(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.
Referenced By
ec_comp(3), ec_comp_add_item(3), ec_comp_count(3), ec_comp_dump(3), ec_comp_free(3), ec_comp_get_attrs(3), ec_comp_get_cur_group(3), ec_comp_get_cur_pstate(3), ec_comp_group_get_attrs(3), ec_comp_group_get_node(3), ec_comp_group_get_pstate(3), ec_comp_item_get_completion(3), ec_comp_item_get_current(3), ec_comp_item_get_display(3), ec_comp_item_get_grp(3), ec_comp_item_get_node(3), ec_comp_item_get_str(3), ec_comp_item_get_type(3), ec_comp_item_set_completion(3), ec_comp_item_set_display(3), ec_comp_item_set_str(3), ec_comp_iter_first(3), ec_comp_iter_next(3), ec_complete_child(3), ec_complete_strvec(3), ec_complete_strvec_expand(3), ec_complete_unknown(3), ec_comp_merge(3).