Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Path: utzoo!utgpu!water!watmath!clyde!cbosgd!mandrill!hal!ncoast!allbery
From: allbery@ncoast.UUCP
Newsgroups: comp.unix.wizards,comp.unix.questions
Subject: Re: The whole prompt string thing (was: PS1 and the bourne shell...)
Message-ID: <6355@ncoast.UUCP>
Date: Sat, 5-Dec-87 12:58:50 EST
Article-I.D.: ncoast.6355
Posted: Sat Dec  5 12:58:50 1987
Date-Received: Sat, 12-Dec-87 05:06:24 EST
References: <279@caus-dp.UUCP> <1311@puff.wisc.edu> <137@anumb.UUCP> <207@jc3b21.UUCP> <305@caus-dp.UUCP>
Reply-To: allbery@ncoast.UUCP (Brandon Allbery)
Followup-To: comp.unix.wizards
Organization: Cleveland Public Access UN*X, Cleveland, Oh
Lines: 24
Xref: utgpu comp.unix.wizards:5450 comp.unix.questions:4674

As quoted from <305@caus-dp.UUCP> by marcos@caus-dp.UUCP (Marcos R. Della):
+---------------
| Well, after mounds of responses from lots of people (I think that we have
| around 30+ messages on this subject floating around) and lots of mail from
| all over the place, so far we have gotten...
| 
| ...nowhere. There are lots of interesting ideas and designs, but so far,
| nothing is working on this little problem. Has anyone out there actually
| done this and gotten it to work?
+---------------

Back when I modified someone's System V sh on a consulting job, I came up
with a way to do this.  I didn't evaluate PS1, instead I set up a variable
PS1FUNC, which overrode PS1; if it existed, it was executed as a shell
command (see the way the "trap" builtin is implemented as an example of how
to do this).  I daresay there are better ways, but I'm not precisely a shell
hacker; that was the first and last time that I have, legitimately or other-
wise, had access to shell source.  (Nor am I interested in non-legitimate
access; if I really want to play with shell source, I'll use the PD shell
from Minix, otherwise I'm quite satisfied with ksh on my 3B1....)
-- 
Brandon S. Allbery		      necntc!ncoast!allbery@harvard.harvard.edu
 {hoptoad,harvard!necntc,cbosgd,sun!mandrill!hal,uunet!hnsurg3}!ncoast!allbery
			Moderator of comp.sources.misc