EC_COMP_ITER_FIRST(3)

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

✨ EC_COMP_ITER_FIRST(3) ✨

okay so bestie, we're in the Libecoli Programmer's Manual and today's main character is ec_comp_iter_first πŸ’… buckle up, this one's short but it's important.


🌸 NAME 🌸

ec_comp_iter_first β€” grab the very first completion item that matches the type you asked for πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

#include <ecoli/complete.h>

struct ec_comp_item * ec_comp_iter_first(
    const struct ec_comp   *comp,  /* The completion list. */
    /*
     * A logical OR of flags among EC_COMP_UNKNOWN, EC_COMP_PARTIAL
     * and EC_COMP_FULL, to select the type to iterate.
     */
    enum ec_comp_type       type
);

πŸ’– DESCRIPTION πŸ’–

so you hand it a completion list and a type, and it gives you back the first item that matches. that's it, that's the whole vibe ✨

also, go peek at EC_COMP_FOREACH() while you're here πŸ‘€ (that's literally all it says, no cap).


🧚 STRUCTURES 🧚

here's the type enum in all its glory, copy it exactly bestie:

enum ec_comp_type {
      EC_COMP_UNKNOWN;
      EC_COMP_FULL;
      EC_COMP_PARTIAL;
      EC_COMP_ALL;
};

πŸ‘‘ RETURN VALUE πŸ‘‘

it returns a completion item. one (1) completion item. iconic behavior, honestly 🫢


🌈 SEE ALSO 🌈

the whole friend group, alphabetically-ish, all of them, no skipping:


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


k that's the whole page bestie, tysm for reading πŸ’– this was libecoli, dated 2026-06-11, page EC_COMP_ITER_FIRST(3) β€” slay, go forth and iterate βœ¨πŸ¦‹

πŸ“¦ where this page comes from