Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 3 Aug 1998 14:27:56 +0200 (MET DST)
From:      Sascha Schumann <sas@schell.de>
To:        William Woods <wwoods@cybcon.com>
Cc:        "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: BASH prompt question
Message-ID:  <Pine.LNX.3.96.980803142023.11763B-100000@www.schell.de>
In-Reply-To: <XFMail.980802235703.wwoods@cybcon.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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?

Edit /etc/profile and insert at the end:

test "$SHELL" = "/bin/bash" && test -e ~/.bashrc && source ~/.bashrc

Or, if that looks too ugly to you:

if [ "$SHELL" = "/bin/bash" -a -e ~/.bashrc ] ; then
	source ~/.bashrc
fi

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

For more info, see man bash ;)

Greetings,

             Sascha


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?Pine.LNX.3.96.980803142023.11763B-100000>