Subject: Re: bug#2400: 23.0.90; shell-mode: garbage in prompt

From: Glenn Morris <[email-masked]>
Date: Fri, 15 Jul 2011 16:55:18 -0400

tags 2400 notabug
stop

Xavier Maillard wrote:

> Here is the definition of my PS1 variable:
>
> \[\033]0;\u@\h: \w\007\]\[\033[0m\033[0;1m\][\[\033[0m\033[0;32m\]\u@\h \[\033[0m\033[1;34m\]\t \[\033[0m\033[0;36m\]\W\[\033[0m\033[0;1m\]]\[\033[0m\033[0;37m\]\$

This does more than just set your prompt and colour it.
It also sets the xterm title to "user@host: pwd".

man console_codes:

   ESC ] 2 ; txt ST        Set window title to txt

This is not an ANSI colour escape sequence and so is not handled by
ansi-color. It's not appropriate to use such a PS1 setting on something
that is not an xterm. For example, it also messes up on the Linux
console.