bug-bash
[Top][All Lists]
Advanced

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

Re: Broken Termcaps


From: Suvayu Ali
Subject: Re: Broken Termcaps
Date: Thu, 2 Mar 2017 11:51:07 +0530
User-agent: Mutt/1.6.0.1 (2016-04-01)

On Wed, Mar 01, 2017 at 05:26:49PM -0500, Greg Wooledge wrote:
> 
> On Wed, Mar 01, 2017 at 05:21:08PM -0500, Lfabbro wrote:
> > Yes you were right the error comes from PS1...
> > I'm sad I have no more the git branch on the prompt... :(
> > Now I use:
> > ps1="\[\033[01;32m\][\u@\h\[\033[01;37m\] \W\[\033[01;32m\]]\$\[\033[00m\]"
> 
> You can still use the $(git) thing if you can get it to stop writing
> escape sequences.

If I may interject, the $(__git_ps1 ..) thing does not print escape
sequences.  The OP is using it incorrectly.  A better way to use the
escape sequence would be:

  (\[\033[31m\]$(__git_ps1 %s)\[\033[37m\])

The OP was embedding the escape sequence in the format string itself.

Hope this helps,

-- 
Suvayu

Open source is the future. It sets us free.



reply via email to

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