Escape ]0 (the \e]0
you're interested in) modifies an XTerm title bar. More at this link: http://www.tldp.org/HOWTO/Bash-Prompt-HOWTO/xterm-title-bar-manipulations.html
Everything inside the []
:
\[\e]0;\u@\h: \w\a\]
Is marked as a non-printing character, so bash
can do the right thing with line wrapping, etc. In this case that means "put the current user@hostname and current working directory in the title bar". The \a
is a bell character.