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

Re: Colorized Prompts Problem



On Mon, May 04, 2015 at 06:54:40AM +0000, Bonno Bloksma wrote:
> Hi,
> 
> > I entered the following in .bashrc
> > 
> >    PS1='\033[01;33m\h:\w\$ \033[00m'       
> > 
> > to colorize the prompt (very handy to find the prompt when a command
> > fills the console screen with lines of text)
> > 
> > The only problem occurs when the next entry is more than one line.  In that
> > case the entry wraps around without moving to a new line.
> 
> I had the same problem using the prompt I found at first, I think it is the same you are using. It seems there is a problem in closing the ANSI code string.
> Someone else gave me this:
>   PS1='\[\e[0;31m\]${debian_chroot:+($debian_chroot)}\h:\w\$\[\e[m\] '
> This does not have the problem, I have been using this now for over a year, no problems at all.
> 
> Bonno Bloksma
> 
Thank you, this works while nothing else did.  The sequences to start
and end coloring are different and the colors are different too.  In the
prompt I was initially using 33 resulted in a bright yellow prompt.
With this prompt 33 results in a dull rust color prompt. No matter, it
works.


> 
> --
> To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
> Archive: [🔎] 89D1798A7351D040B4E74E0A043C69D7D3D4EB93@EinExch-01.tio.nl">https://lists.debian.org/[🔎] 89D1798A7351D040B4E74E0A043C69D7D3D4EB93@EinExch-01.tio.nl
> 
> 


Reply to: