From owner-freebsd-questions Mon Aug 3 12:36:34 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id MAA24190 for freebsd-questions-outgoing; Mon, 3 Aug 1998 12:36:34 -0700 (PDT) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from dart.sr.se (dart.SR.SE [193.12.91.98]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id MAA24185 for ; Mon, 3 Aug 1998 12:36:31 -0700 (PDT) (envelope-from gunnar@pluto.sr.se) Received: (from smap@localhost) by dart.sr.se (8.8.2/8.7.3) id VAA15060 for ; Mon, 3 Aug 1998 21:36:20 +0200 (MET DST) Received: from unknown(134.25.193.91) by dart.sr.se via smap (V1.3) id sma015054; Mon Aug 3 21:36:18 1998 Received: (from gunnar@localhost) by pluto.sr.se (8.8.8/8.8.7) id VAA11611 for questions@FreeBSD.org; Mon, 3 Aug 1998 21:36:18 +0200 (CEST) (envelope-from gunnar) Message-ID: <19980803213618.C11549@sr.se> Date: Mon, 3 Aug 1998 21:36:18 +0200 From: Gunnar Flygt To: FreeBSD Questions Subject: Re: BASH prompt question Reply-To: flygt@sr.se References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.1i In-Reply-To: ; from Sascha Schumann on Mon, Aug 03, 1998 at 08:28:33PM +0200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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