Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 20 Mar 2000 16:38:53 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Boris Stoev <darko@uni-svishtov.bg>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Directory path
Message-ID:  <20000320163853.B81662@hades.hell.gr>
In-Reply-To: <38D6038C.5B9FBC5F@uni-svishtov.bg>; from darko@uni-svishtov.bg on Mon, Mar 20, 2000 at 12:55:09PM %2B0200
References:  <38D6038C.5B9FBC5F@uni-svishtov.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 20, 2000 at 12:55:09PM +0200, Boris Stoev wrote:
>
> Maybe my question is stupid but...
> How can I make bash prompt  to display my current directory path...
> I use FreeBSD 3.4

Although this is really a bash-specific question, and you would usually
have more chances of getting an answer from a mailing list dedicated to
bash... well, there are a few 'escapes' for PS1 listed in info '(bash)'.

What you want is \w, as shown in:

    export PS1='[\w] '

Don't be fooled by the [..] brackets.  They're not necessary; they just
make the directory more easy to read among the rest of your prompt.
What I customarily use on a lot of systems is:

    export PS1='\h!\u:\w\$ '

or some more funky variation of this :)

- Giorgos Keramidas


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?20000320163853.B81662>