GNOME Bugzilla – Bug 326554
Do not write ESC to the terminal.
Last modified: 2007-02-06 12:49:14 UTC
Please describe the problem: While using this bash prompt configuration gnome-terminal fails to display the prompt correctly, there is a white rectangle before the "~" which should not be there at all. Here is what the prompt looks like with Gnome-terminal:http://putfile.com/pic.php?pic=1/917483511.png&s=x12 Here is what it looks like with Konsole:http://putfile.com/pic.php?pic=1/920091394.png&s=x12 Take note of the lack of the white rectangular line to the left of the "~" (tild) symbol. Here is the bash prompt code: red="\[\033[0;31m\]" green="\[\033[0;32m\]" white="\[\033[1;37m\]" PS1="$white\t \d \n\[\033\]$green\w>\[\033[0m\]" Steps to reproduce: 1. Use bash prompt configuration 2. Open gnome-terminal 3. Actual results: Expected results: Does this happen every time? yes Other information: This bug also seems to affect xfce's Terminal (version 0.2.4) emulator the behavior is exactly the same.
The reason you are seeing that box is because you have an extra \033 inyour prompt: you should say PS1="$white\t \d \n$green\w>\[\033[0m\]" Now, IMO vte should not write ESC, just ignore them. I'll move this to vte, change the summary, and look at the matcher later to see how to fix this. Incomplete control sequences should be ignored, not reinterpreted as input.
anachronistic dup. *** This bug has been marked as a duplicate of 403130 ***