Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month at the Massachusetts Institute of Technology, in Building E51.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

ubuntu terminal directory



derek martinn 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.

me too -- found it, not an easy read -- but good, though.

> If you want the full path to your home directory to be
> displayed, try replacing \w (or \W) with "\$PWD" instead...
> I believe that works.

indeed it do.  thanks.

ole dan

j. daniel moylan
84 harvard ave
brookline, ma 02446-6202
617-232-2360 (tel)
810-454-1823 (fax)
jdm-LPA1KyJyIuz1P9xLtpHBDw at public.gmane.org
www.moylan.us
[death to html bloat!]







BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org