EC_EDITLINE_SET_HISTORY(3)

NAME
ec_editline_set_history - Change the history size.

SYNOPSIS
#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
);

DESCRIPTION

The default behavior is to have a history whose size is EC_EDITLINE_HISTORY_SIZE. This can be changed with this function.

RETURN VALUE

0 on success, or -1 on error (errno is set).

SEE ALSO

ec_editline_get_el(3), ec_editline_set_prompt(3), ec_editline_complete(3), ec_editline_set_prompt_esc(3), ec_editline_parse(3), ec_editline_free(3), ec_editline_term_size(3), ec_editline_gets(3), ec_editline_interact(3), ec_editline_set_node(3), ec_editline(3), ec_editline_get_node(3), ec_editline_curline(3)

COPYRIGHT

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