EC_COMP_ITEM_SET_COMPLETION(3)

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

πŸ’– ec_comp_item_set_completion β€” bestie edition πŸ’–

okay so this page lives in the Libecoli Programmer's Manual, section 3, and it's literally about one thing: setting the completion value of an item. that's it. that's the whole vibe. let's go 🫢


✨ NAME ✨

ec_comp_item_set_completion β€” Set the completion value of an item.

like. the name tells you everything. no cap. πŸ‘‘


🌸 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. */
);

so you roll up with a struct ec_comp_item * β€” that's the item you're updating, bestie β€” and a const char * holding your brand new completion string. two args, zero drama. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so listen. the completion string is the thing that actually gets added to the incomplete token to complete it. it's the glow-up your half-typed word has been waiting for. ✨

and here's the tea: some nodes β€” sh_lex being the main character here β€” will modify that completion string in the items generated by their children. why? for stuff like adding a terminating quote. yeah. it's giving "I raised you and now I'm doing your hair before you go out." πŸ’‡β€β™€οΈ


πŸ’œ RETURN VALUE πŸ’œ

  • 0 β€” success!! slay!! everything ate, nothing left on the plate 🍽️✨
  • -1 β€” error 😭 and ngl errno gets set, so go read it, it's telling you what went wrong fr fr

πŸŽ€ SEE ALSO πŸŽ€

the whole friend group, no one left behind, we're all linked together:


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


okay that's the whole page bestie, tysm for reading, this was libecoli, dated 2026-06-11, and yes it's an EC_COMP_I...COMPLETION(3) situation. mwah. πŸ’‹ go complete something iconic today 🌈⭐

πŸ“¦ where this page comes from