EC_EDITLINE_SET_HISTORY(3)

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

πŸŽ€ EC_EDITLINE_SET_HISTORY β€” bestie edition πŸŽ€

okay so this is a page from the Libecoli Programmer's Manual, and it's about ec_editline_set_history πŸ’– the girl whose whole job is literally just... changing your history size. iconic behavior tbh.


✨ NAME ✨

ec_editline_set_history β€” Change the history size. πŸ“œβœ¨


✨ SYNOPSIS ✨

bestie, here's the whole vibe, character for character, no edits, no notes:

#include <ecoli/editline.h>

int ec_editline_set_history(
    struct ec_editline   *editline,   /* The pointer to the ec_editline structure. */
    size_t                hist_size,  /* The desired size of the history. */
    /*
     * Optional file path to load and write the history to.
     */
    const char           *hist_file
);

so you pass in your editline pointer, the size you want, and optionally a file path to load and write the history to 🫢 the comments are right there in the code, they're part of the vibe, do not touch them πŸ’…


✨ DESCRIPTION ✨

okay so the default? the default behavior is that you get a history whose size is literally EC_EDITLINE_HISTORY_SIZE. that's the starting point, the factory setting, the out-of-the-box moment ✨

and this function? this function is how you change that πŸ’« that's it, that's the whole plot. you call it, you say "actually bestie, I want this size", and the history size becomes what you asked for. slay.


✨ RETURN VALUE ✨

  • 0 on success β€” we ate, no crumbs πŸŽ€
  • -1 on error, and errno is set β€” so go read errno, it's telling you what went wrong, fr fr 😭

🌈 SEE ALSO 🌈

the whole friend group, all of them, in order, exactly as listed:


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


ngl that's the whole page. no cap, no extra lore, just history size management and respect for the authors πŸ’…

and that's the tea, bestie πŸ¦‹ β€” this was libecoli, dated 2026-06-11, from the Libecoli Programmer's Manual. mwah, bye πŸ‘‘βœ¨

πŸ“¦ where this page comes from