Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!brl-adm!brl-smoke!gwyn From: gwyn@brl-smoke.ARPA (Doug Gwyn ) Newsgroups: comp.unix.wizards,comp.unix.questions Subject: Re: The whole prompt string thing (was: PS1 and the bourne shell...) Message-ID: <6780@brl-smoke.ARPA> Date: Thu, 3-Dec-87 01:30:57 EST Article-I.D.: brl-smok.6780 Posted: Thu Dec 3 01:30:57 1987 Date-Received: Sun, 6-Dec-87 09:33:57 EST References: <279@caus-dp.UUCP> <1311@puff.wisc.edu> Reply-To: gwyn@brl.arpa (Doug Gwyn (VLD/VMB)) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 16 Xref: mnetor comp.unix.wizards:5764 comp.unix.questions:5180 In article <3045@umn-cs.cs.umn.edu> randy@umn-cs.UUCP (Randy Orrison) writes: >I haven't heard anyone talking about versions of sh or ksh here. What versions >of each are needed to do these things? Obviously, all versions don't do command >evaluation or variable substitution when displaying the prompt. You do NOT need for the shell to do tricks while printing the value of PS1, although if your shell does that then it can be used to do what was requested. Any shell that supports shell functions will support user definition of a command to be used instead of the built-in "cd", that will not only perform cd but also update PS1. UNIX System V shells starting with Release 2.0 have such support. For such a function to also be called "cd", so you can't forget to use the new function and mistakenly invoke just the built-in, you need a shell that permits functions to redefine builtin names; the UNIX System V shells do not permit this. However, if you have a valid source license you can obtain the BRL version of the SVR2 Bourne shell, which has this and much more.