bug-bash
[Top][All Lists]
Advanced

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

Re: set the PS1 env with SGR cause problem


From: Greg Wooledge
Subject: Re: set the PS1 env with SGR cause problem
Date: Fri, 17 Apr 2009 10:09:30 -0400
User-agent: Mutt/1.4.2.2i

On Fri, Apr 17, 2009 at 05:45:33PM +0800, tianlijian wrote:
> 1. add the "export PS1='[\e[1;34m\W\e[0m]\$ " to /etc/profile or
> ~/.bash_profile .

You need to put \[ and \] (literally) around escape sequences in your
prompt that don't move the cursor.  In your case:

PS1='[\[\e[1;34m\]\W\[\e[0m\]]\$ '




reply via email to

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