On Wed, Jun 13, 2001 at 10:15:42AM +0200, Walter Laub wrote:
> Hello,
>
> I think there is a bug in bash:
> version: GNU bash, version 2.04.0(1)-release (i386-suse-linux)
> hardware: x86, linux
> If I set a colored prompt " export PS1='^[[31m${LOGNAME}@${HOSTNAME}
> \>^[[37m' " then a longer commandline is missing the automatical newline
> and overwrites itself. Without the escape-sequences for coloring there
> is no problem.
>
man bash - see the section titled "PROMPTING"
Basically you need to add \] to end the sequence of non printing chars.
eg. \[\e[0;32m\]
Regards,
Doug