You are not logged in.
Hey guys, not really a newbie but I don't know where to put this. I've been using Arch for about five years now, normally I can work out my issues, but this one has me a little confused.
I'm having a weird problem with escape sequences in PS1, specifically with gnome-terminal and guake.
I'd google it, but I have no idea what this is called. It seems to be printing the escape sequences as a character.
Any ideas?
Offline
Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code and post your .bashrc
Offline
~/.bashrc
PS1="\e[0;32m\]\u@\h \w >\e[0m\] "
Offline
It should read:
PS1="\[\e[0;32m\]\u@\h \w >\[\e[0m\] "
\[ and \] are used around any non-printable sequences, such as color codes.
Now, while this fixes the bug, I'm still a bit confused as to why gnome-terminal shows a "0002". That would indicate a byte with the value "0x02". I don't see such a byte in your $PS1. It appears a "0002" is printed instead of "\]".
A little riddle.
Offline