EC_INTERACT_SET_DESC(3)

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

πŸ’– EC_INTERACT_SET_DESC πŸ’–

okay bestie, welcome to the Libecoli Programmer's Manual ✨ this one's a lil function from the libecoli crew and it's genuinely so useful, no cap.


🌸 NAME 🌸

ec_interact_set_desc β€” set the short description of a grammar node. that's it. that's the job. πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/interact.h>

int ec_interact_set_desc(
    struct ec_node   *node,  /* The ec_node on which to add the desc attribute. */
    const char       *desc   /* The short description string. */
);

like… look at her. two little args and a dream. 🫢


✨ DESCRIPTION ✨

so what she does is: she sets the node attribute EC_INTERACT_DESC_ATTR on the node, and that attribute holds the string you passed in as desc. easy. iconic. no drama. πŸŽ€

and why do we care?? because the ec_interact functions read that attribute to display the short description of the contextual help β€” and the way it works, it overrides the value that ec_node_desc() would have given you. so if you wanna be the main character and decide what the help text says yourself, this is your girl. πŸ‘‘

heads up bestie: this is a short description we're talking about β€” it's the one that shows up in contextual help. keep it cute and brief. πŸ’•

🌈 RETURN VALUE 🌈

  • 0 β€” success, slay, we ate πŸ’…βœ¨
  • -1 β€” error, we are NOT okay 😭

πŸ‘€ SEE ALSO πŸ‘€

the whole friend group, fr fr:


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


and that's the whole page, bestie!! this was libecoli, dated 2026-06-11, page EC_INTERACT_SET_DESC(3) β€” go set some descriptions and be the main character of your own help output πŸ’–βœ¨πŸ¦‹

πŸ“¦ where this page comes from