ubuntu terminal directory

Bill Bogstad bogstad-e+AXbWqSrlAAvxtiuMwx3w at public.gmane.org
Tue Mar 30 14:02:57 EDT 2010


On Tue, Mar 30, 2010 at 1:42 PM, Derek Martin <invalid-yPs96gJSFQo51KKgMmcfiw at public.gmane.org> wrote:
> On Tue, Mar 30, 2010 at 10:53:12AM -0400, j. daniel moylan wrote:
>> a few days ago derek martin gave the following as a prompt:
>>
>> PS1="\[\033]2;${chroot}\u@\h \W\007\][${chroot}\u@\h \w]\n\\$ "
>>
>> good stuff -- i always wanted to be able to put the current
>> host into the title bar.  where can i read more about the
>> protocol involved using brackets, octal numbers, etc.
>
> The brackets and octals are codes interpreted directly by the
> terminal.  You can look up xterm/vt101 control codes to get them.
> I did a web search ages ago to get the basics for that particular
> incantation, and I've just modified it to suit my preferences.

For a (more or less) definitive definition of those codes you should
look for the xterm ctlseqs document.  Googling for just
ctlseqs, it's the first link.  You might also find it in
/usr/share/doc/xterm, if you have xterm installed on your system.

Bill Bogstad






More information about the Discuss mailing list