Jan Engelhardt wrote:
Bash Version: 3.2
Patch Level: 25
Release Status: release
Description:/Repeat-By:
Having a prompt with color definitions makes readline reposition
the cursor wrong on many occassions. Here is one of them.
export PS1="\[\e[1;30m\]\A \[\e[0;32m\]\h:\w \[\e[1;37m\]>\[\e[0m\] ";
(type the following verbatim)
echo word1 word2 word3 word4 word5 word6
(now hit keys Alt-4 Alt-b to move the cursor 4 words to the left)
The cursor will be repositioned to a column inside the prompt area
instead of the designated position. I suppose this is due to
readline using (or bash passing in) strlen(PS1) instead of
strlen(stripescapecodes(PS1)).
I can't reproduce this using bash-3.2.39 on Mac OS X with Terminal, aterm,
or xterm.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
Chet Ramey, ITS, CWRU [EMAIL PROTECTED] http://cnswww.cns.cwru.edu/~chet/