EC_COMP_I...T_DISPLAY(3)

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

πŸ’– EC_COMP_I...T_DISPLAY(3) πŸ’–

okay bestie, welcome to the Libecoli Programmer's Manual β€” this one's about ec_comp_item_set_display, and yes, it's lowkey iconic for such a tiny function. sit with me, we're gonna make it make sense. 🫢


✨ NAME ✨

ec_comp_item_set_display β€” set the display value of an item. that's it, that's the whole vibe. πŸ’…


🌸 SYNOPSIS 🌸

#include <ecoli/complete.h>

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

so you're passing in item (the completion item you wanna update, main character) and display (the shiny new display string). two args, no drama. ✨


πŸ¦‹ DESCRIPTION πŸ¦‹

okay so, the display string is literally what shows up when someone lists out the possible completions. it's the face card. the whole ~look~ of your completion. πŸŽ€

and some nodes β€” like ec_node_file() β€” will change the default value to display the base name instead of the full path. so if you were wondering why your completions weren't showing the entire path, that's why. it's giving intentional. periodt. πŸ’œ


🌈 RETURN VALUE 🌈

  • 0 β€” success, slay, we ate πŸ’…
  • -1 β€” error, and errno is set (go check it, bestie) 😭

πŸ‘‘ SEE ALSO πŸ‘‘

the whole friend group, fr fr:

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_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)

like. look at that list. it's a whole party and everyone's invited. 🧚


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


and that's the tea, bestie πŸ’– this page came to you from libecoli, dated 2026-06-11, and honestly? iconic of them. go forth and set those display values. you got this. πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from