Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Aug 1998 21:36:18 +0200
From:      Gunnar Flygt <gunnar@pluto.sr.se>
To:        FreeBSD Questions <questions@FreeBSD.ORG>
Subject:   Re: BASH prompt question
Message-ID:  <19980803213618.C11549@sr.se>
In-Reply-To: <Pine.LNX.3.96.980803202247.29560A-100000@www.schell.de>; from Sascha Schumann on Mon, Aug 03, 1998 at 08:28:33PM %2B0200
References:  <ML-3.3.902168241.7515.patl@asimov> <Pine.LNX.3.96.980803202247.29560A-100000@www.schell.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Aug 03, 1998 at 08:28:33PM +0200, Sascha Schumann wrote:


> On Mon, 3 Aug 1998 patl@phoenix.volant.org wrote:

> > > On Sun, 2 Aug 1998, William Woods wrote:
> > > 
> > > > I would like to make my bash prompt show a little more info, like what
> > > > dir the user is in. How would I do this?

> > > Then you can put all your personal stuff (in case your system is used by
> > > more than one) in your ~/.bashrc:
> > >
> > > PS1='\u@\h:`pwd -P` $ '
> > > export PS1
> > 
> > Yep, this is the way to do it.

> If I may correct myself here:

> PS1='\u@\h:`pwd -P` \$ '

> \$ will be replaced with uid==0 ? '#' : '$'

I often find that to be a little too long prompt. If one puts in a \W
after the h: only the rightmost part of the path is visible.
Something like: PS1='\u@\h: \W \\$ '

-- 
regards, Gunnar
email: flygt@sr.se


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



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