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.