Hello,

I think I've discovered a bug in mksh.  According to the man page:

    In these editing modes, if a line is longer than the
    screen width (see the COLUMNS parameter), a ‘>’, ‘+’ or
    ‘<’ character is displayed in the last column indicating
    that there are more characters after, before and after,
    or before the current position, respectively.  The line
    is scrolled horizontally as necessary.

Now, my prompt looks something like this:

PS1=$'\e[38;5;250m[$(echo $?)] \e[38;5;244m$(pwd)\e[0;0m $'

It turns out that the invisible ANSI escape sequences count towards the length of the line! This means that mksh "breaks" the line much earlier than necessary, making it difficult to use colors in the prompt.

Is there any way to disable this behavior or to customize it?

Happy new year,
John

Reply via email to