NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

lib/53856: editline/libedit not prompting colors in readline mode

>Number:         53856
>Category:       lib
>Synopsis:       editline/libedit not prompting colors in readline mode
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jan 10 17:55:00 +0000 2019
>Originator:     F. Aragon
>Release:        default branch
Volta Networks Inc
Using the readline emulation mode, the rl_initialize() function should call el_set() with EL_PROMPT_ESC instead of EL_PROMPT, so ANSI escape sequences get interpreted.

diff a/src/lib/libedit/readline.c b/src/lib/libedit/readline.c
--- a/src/lib/libedit/readline.c
+++ b/src/lib/libedit/readline.c
@@ -323,7 +323,7 @@ rl_initialize(void)
                return -1;
-       el_set(e, EL_PROMPT, _get_prompt, RL_PROMPT_START_IGNORE);
+       el_set(e, EL_PROMPT_ESC, _get_prompt, RL_PROMPT_START_IGNORE);
        el_set(e, EL_SIGNAL, rl_catch_signals);

Home | Main Index | Thread Index | Old Index