Xref: utzoo comp.unix.wizards:5691 comp.unix.questions:4763
Path: utzoo!mnetor!uunet!littlei!foobar!tw
From: tw@foobar.UUCP (Tom Walsh)
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: PS1 and PWD in david korn's shell
Message-ID: <3@dropte.foobar.UUCP>
Date: 13 Dec 87 20:38:34 GMT
References: <279@caus-dp.UUCP> <1311@puff.wisc.edu> <137@anumb.UUCP> <305@caus-dp.UUCP> <3075@megaron.arizona.edu> <7@ritcv.UUCP>
Sender: news@foobar.UUCP
Reply-To: tw@dropte.UUCP (Tom Walsh)
Followup-To: /dev/null
Distribution: na
Organization: - Intel Corp - Hawthorne Farms - Hillsboro, OR -
Lines: 18

In article <7@ritcv.UUCP> ccs6277@ritcv.UUCP (PUT YOUR NAME HERE) writes:
> ...in Korn Shell
...lots of work to get cwd in PS1 using korn shell
> Cliff Skolnick
> ...rochester!ritcv!ccs6277
> ...rochester!ritcv!ritcsh!sabin!lazlo!{root|ccs}
$PWD is maintained by korn shell.  use it.  it is cheaper than
`pwd`... by a  long shot.
i use
--/etc/profile--(FOR ALL USERS)
mach=`uuname -l` # could use uname -s or -n ...
--~user/.kshrc--(SALT TO TASTE)
PS1='! $mach $PWD ' ; export PS1

all done....
the "'" causes ksh to delay evaluation until printing the prompt.
there are certain versions extant that seem to have problems with
maintaining PWD accurately, and symlinks are probably neat too...