current pwd in prompt

Greg Pasquariello X1190 gp at picuxa.UUCP
Tue Feb 9 01:03:48 AEST 1988


In article <11656 at brl-adm.ARPA>, Mensing.HENR801c at Xerox.COM writes:
> 
> Can anyone explain to me how to get my prompt to be the current directory? I
> have tried several methods without any success. It seems that no matter what
> method I try, the prompt is evaluated once and never changes.
> 
> Just in case it matters, I am on an AT&T 3B2/400 running korn shell under UNIX
> System V.3.1.


Aaargh not again!  You can't believe how this same quesstion cluttered up the
netwaves recently.


Since you're running korn-shell, your in luck.  The way I have done it as 
follows:

	Create a file called .env or something like that in your home
	directory.

	Add the line PS="`pwd` > "    The '>' is not necessary, but I use
	it to delimit my prompt.		

	Add the line ENV=$HOME/.env to your .profile.

This works for me.  You should probably prepare yourself to receive a flurry
of responses to this question.

Good Luck

Greg Pasquariello
ihnp4!picuxa!gp



More information about the Comp.unix.questions mailing list