Prompt changing on the fly - Oops

chris at mimsy.UUCP chris at mimsy.UUCP
Mon Jan 19 15:40:14 AEST 1987


In article <376 at danews.ATT.COM> lvc at danews.ATT.COM (Larry Cipriani) writes:
>>Impossible in the Bourne shell.  I don't know about the C-shell.

[also Larry]
>Later that same day:
>
>Oops, it is possible in the Bourne shell.  What you can do
>is define a function (not well known in the Bourne shell)
>to do your cd's and set PS1.

Not all Bourne shells are bourne equal.  (Sorry)  *If* your Bourne
shell has shell functions, yes; if not, you are also correct.

How can you tell whether your Bourne shell has shell functions?
Try Larry's example chdir().  If sh says

	syntax error: `(' unexpected

it does not have shell functions.
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7690)
UUCP:	seismo!mimsy!chris	ARPA/CSNet:	chris at mimsy.umd.edu



More information about the Comp.unix.questions mailing list