bug-bash
[Top][All Lists]
Advanced

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

Re: PS1 colored


From: Doug Kearns
Subject: Re: PS1 colored
Date: Wed, 13 Jun 2001 19:24:16 +1000
User-agent: Mutt/1.2.5i

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 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]