Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2000 04:18:23 +0200
From:      Giorgos Keramidas <keramida@ceid.upatras.gr>
To:        Chip <chip@wiegand.org>
Cc:        Boris Stoev <darko@uni-svishtov.bg>, freebsd-questions@FreeBSD.ORG
Subject:   Re: Directory path
Message-ID:  <20000321041823.B17616@hades.hell.gr>
In-Reply-To: <00032017042101.05398@chip.homenet>; from chip@wiegand.org on Mon, Mar 20, 2000 at 05:03:39PM -0800
References:  <20000320163853.B81662@hades.hell.gr> <00032017042101.05398@chip.homenet>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 20, 2000 at 05:03:39PM -0800, Chip wrote:
>On Mon, 20 Mar 2000, Giorgos Keramidas wrote:
>>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
...
>> What you want is \w, as shown in:
>> 
>>     export PS1='[\w] '
...
>> or some more funky variation of this :)
>
>Doesn't the comand pwd show the currant path?
>It does for me.

It does for me too.  But having your bash fork and exec() a subshell to
execute `pwd` and capture the same output that \w could give, just to
display what bash can do with \w is a bit of an overkill, don't you
think?

- 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?20000321041823.B17616>