From: Luiz Augusto von Dentz <luiz.von.dentz@xxxxxxxxx> According to readline documentation \001 and \002 has to be used to delimit characters which takes no space: 'Applications may indicate that the prompt contains characters that take up no physical screen space when displayed by bracketing a sequence of such characters with the special markers `RL_PROMPT_START_IGNORE' and `RL_PROMPT_END_IGNORE'.' --- src/shared/shell.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/shared/shell.h b/src/shared/shell.h index 8b7cb7f30..e14d58381 100644 --- a/src/shared/shell.h +++ b/src/shared/shell.h @@ -22,14 +22,14 @@ */ #include <getopt.h> -#define COLOR_OFF "\x1B[0m" -#define COLOR_RED "\x1B[0;91m" -#define COLOR_GREEN "\x1B[0;92m" -#define COLOR_YELLOW "\x1B[0;93m" -#define COLOR_BLUE "\x1B[0;94m" -#define COLOR_BOLDGRAY "\x1B[1;30m" -#define COLOR_BOLDWHITE "\x1B[1;37m" -#define COLOR_HIGHLIGHT "\x1B[1;39m" +#define COLOR_OFF "\001\x1B[0m\002" +#define COLOR_RED "\001\x1B[0;91m\002" +#define COLOR_GREEN "\001\x1B[0;92m\002" +#define COLOR_YELLOW "\001\x1B[0;93m\002" +#define COLOR_BLUE "\001\x1B[0;94m\002" +#define COLOR_BOLDGRAY "\001\x1B[1;30m\002" +#define COLOR_BOLDWHITE "\001\x1B[1;37m\002" +#define COLOR_HIGHLIGHT "\001\x1B[1;39m\002" struct bt_shell_menu; -- 2.20.1