EC_COMP_ITEM_SET_COMPLETION(3)

NAME
ec_comp_item_set_completion - Set the completion value of an item.

SYNOPSIS
#include <ecoli/complete.h>

int ec_comp_item_set_completion(
    struct ec_comp_item   *item,        /* The completion item to update. */
    const char            *completion   /* The new completion string. */
);

DESCRIPTION

The completion string corresponds to what should be added to the incomplete token to complete it. Some nodes like sh_lex modify it in the items generated by their children, for instance to add a terminating quote.

RETURN VALUE

0 on success, or -1 on error (errno is set).

SEE ALSO

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_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_get_cur_group(3)

COPYRIGHT

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