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

RE: Colorized Prompts Problem



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


Reply to: