EC_EDITLI...ROMPT_ESC(3)

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

πŸ’– 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 πŸ”₯

  • 0 on success ✨
  • -1 on error 😭

πŸ¦‹ SEE ALSO πŸ¦‹


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