Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 2 Jan 2002 17:55:06 +0100 (CET)
From:      Oliver Fromme <olli@secnetix.de>
To:        freebsd-questions@FreeBSD.ORG
Subject:   Re: Some /bin/sh questions
Message-ID:  <200201021655.g02Gt6U62846@lurza.secnetix.de>
In-Reply-To: <20020102171148.A45897@klamath.local>

next in thread | previous in thread | raw e-mail | index | archive | help
Julio Merino <juli@klamath.local> wrote:
 > [...]
 > No, no, no... PS1, not PATH.

Oops ...  I'm sorry.  I must have had my mind somewhere else.

Now I see what you mean.  I don't think you can do that
directly, but you can do some magic by overloading the
"cd" builtin command by a shell function.  Something like
this:

   cd () { command cd "$1"; PS1="`pwd` > "; }

That should get you the idea.  Note that both "cd" and
"pwd" are builtin commands, so there's not much of an
efficiency concern.

You can put the above line into your .profile script.
But then again, as I wrote in my previous mail, if you're
familiar with zsh, just use zsh.  it has a _lot_ more
convenient features.

Regards
   Oliver

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.

"All that we see or seem is just a dream within a dream" (E. A. Poe)

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?200201021655.g02Gt6U62846>