Path: utzoo!utgpu!water!watmath!clyde!rutgers!topaz.rutgers.edu!ron
From: ron@topaz.rutgers.edu (Ron Natalie)
Newsgroups: comp.unix.wizards
Subject: Re: The whole prompt string thing (
Message-ID: <16952@topaz.rutgers.edu>
Date: 10 Dec 87 19:58:32 GMT
References: <2368@emory.uucp> <142700018@occrsh.ATT.COM>
Organization: Rutgers Univ., New Brunswick, N.J.
Lines: 9

The PS1 string in the Bourne shell is not reevaluated prior to printing
(unless you modify the source as some have suggested).  Again, the best
way to do this is to change the prompt by defining a function (in 5R2
or later) to replace cd that changes the prompt.  It is definately a lose
to run 'pwd' on every prompt to set it when you can only change it by
the "cd" command, you only need to do that work when cd'ing.  You can
also add popd and pushd at the same time.

-Ron