Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Jul 2005 09:25:24 -0400
From:      Aaron Peterson <dopplecoder@gmail.com>
To:        Alex Yarmol <alex.yarmol@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Bash prompt
Message-ID:  <45d750d205071806252b2697f7@mail.gmail.com>
In-Reply-To: <f1b7642105071714301ee2a19b@mail.gmail.com>
References:  <f1b7642105071714301ee2a19b@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 7/17/05, Alex Yarmol <alex.yarmol@gmail.com> wrote:
> How I can chage my bash prompt to this:
>=20
> [user@host directory-name(e. g. "alex" for /usr/home/alex)]$
>=20
> I assume that I need to do that:
>=20
> export PS1=3D'[\u@\h \(here i don't know what to do, i assume, that I
> need to write "\p" or "\P", but it's not working)]\$

\w lowercase should give you the full path
\W uppercase gives the last component of the path, so given:

[user@host /]$ cd /usr/local/etc
[user@host etc]$

which tend to prefer to the full path, but you didn't ask what I prefer :-)
Aaron



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?45d750d205071806252b2697f7>