Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!mnetor!uunet!husc6!uwvax!oddjob!gargoyle!ihnp4!alberta!edson!tic!ruiu
From: ruiu@tic.UUCP (Dragos Ruiu)
Newsgroups: comp.unix.questions,comp.unix.wizards
Subject: Re: PS1 and the bourne shell...
Message-ID: <163@tic.UUCP>
Date: Fri, 27-Nov-87 20:28:21 EST
Article-I.D.: tic.163
Posted: Fri Nov 27 20:28:21 1987
Date-Received: Mon, 30-Nov-87 01:07:16 EST
References: <279@caus-dp.UUCP> <1311@puff.wisc.edu> <137@anumb.UUCP> <9354@ufcsv.cis.ufl.EDU>
Organization: U of A, E.E., Edmonton,Canada
Lines: 28
Summary: Quick kludge... or not so quick depending on how good
Xref: mnetor comp.unix.questions:5130 comp.unix.wizards:5670


[discussion is about how to print your working directory as your prompt]

There is a way to do it, and it's not pretty.

You can use a different agent to change directories, and have that agent
change your prompt.

I'm not exactly sure how you would like to do this on the bourne shell, but 
you could write a little script to perform all cd's... and use this script
instead of the cd. You could get as fancy as you like, all it would take
is retraining your fingers.

So you would use mycd instead of cd when you want to change directories,
and mycd would change your prompt too. I used a little kluge like this on
VMS to emulate the MS-Clunk :-) 'set prompt $p$g' setup.

On VMS I called it cd, but under bourne you would would have to call it
something else because the builtin cd takes precedence.

[On a related note, anybody know if Microport fixed the cwd bug in c-shell
 in 2.3 or when they will bother to actually ship mine :-( ]

-- 
Dragos Ruiu          Disclaimer: My opinons are my employer's, I'm unemployed!
            UUCP:{ubc-vision,mnetor,vax135,ihnp4}!alberta!edson!tic!dragos!work
(403) 432-0090         #1705, 8515 112th Street, Edmonton, Alta. Canada T6G 1K7 
Never play leapfrog wa, a, athat
non