EC_EDITLI...ROMPT_ESC(3)
π NAME π
ec_editline_set_prompt_esc β set editline escaped prompt. That's the whole job, bestie, and it does it beautifully. β¨
π 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 πΈ
okay so this is straight-up lifted from el_set(3), here's the lore, no cap:
If the start/stop delim character shows up inside the prompt, that character itself does not get printed β nope, not a single pixel. But everything after it gets printed directly to the terminal, and it does NOT touch the state of the current line. The way that works is honestly iconic.
Then a second start/stop literal character comes along and ends this whole behavior. Slay.
So what's it for? It's typically used to embed literal escape sequences that change the color/style of the terminal in the prompt. Your prompt can be cute AND functional, periodt. π
π careful though: the literal escape character cannot be the last character in the prompt. It literally can't, because the escape sequence gets attached to the next character in the prompt. Put it at the very end and it's givingβ¦ nothing. It just won't vibe. Don't do it. π
π₯ RETURN VALUE π₯
0on success β¨-1on 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)
π COPYRIGHT π
Copyright (C) 2010-2026 Olivier Matz, Robin Jarry.
ok bestie that's the whole page π«Ά this was libecoli, dated 2026-06-11, and the manual page itself is EC_EDITLI...ROMPT_ESC(3) from the Libecoli Programmer's Manual. go make your prompt pretty, you've got this πβ¨
π¦ where this page comes from
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- fedora 44: libecoli-devel 0.11.7-1.fc44 Β· BSD-3-Clause AND LicenseRef-Fedora-Public-Domain
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms