ec_editline_set_prompt_esc - Man Page

Synopsis

#include <ecoli/editline.h>

int ec_editline_set_prompt_esc(
    struct ec_editline   *editline,  /* The pointer to the ec_editline structure. */
    const char           *prompt,    /* The prompt string to use. */
    char                  delim      /* The start/stop literal prompt character. */
);

Description

Set editline escaped prompt.

From el_set(3):

If the start/stop delim character is found in the prompt, the character itself is not printed, but characters after it are printed directly to the terminal without affecting the state of the current line. A subsequent second start/stop literal character ends this behavior. This is typically used to embed literal escape sequences that change the color/style of the terminal in the prompt. Note that the literal escape character cannot be the last character in the prompt, as the escape sequence is attached to the next character in the prompt.

Return Value

0 on success, or -1 on error.

See Also

ec_editline_get_el(3), ec_editline_set_prompt(3), ec_editline_complete(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_set_history(3), ec_editline(3), ec_editline_get_node(3), ec_editline_curline(3)

Referenced By

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

2026-05-21 Libecoli Programmer's Manual