Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site gatech.CSNET Path: utzoo!watmath!clyde!burl!ulysses!gatech!arnold From: arnold@gatech.CSNET (Arnold Robbins) Newsgroups: net.unix,net.unix-wizards Subject: Re: Bourne shell modifications, past and future Message-ID: <2064@gatech.CSNET> Date: Tue, 26-Nov-85 13:12:50 EST Article-I.D.: gatech.2064 Posted: Tue Nov 26 13:12:50 1985 Date-Received: Wed, 27-Nov-85 06:18:46 EST References: <1943@gatech.CSNET> <10@druri.UUCP> <21@pixdoc.UUCP> <3@bbncc5.UUCP> <161@nitrex.UUCP> <122@rexago1.UUCP> <847@whuxl.UUCP> Reply-To: arnold@gatech.UUCP (Arnold Robbins) Organization: The Bill the Cat Fan Club Lines: 60 Xref: watmath net.unix:6384 net.unix-wizards:15865 In article <847@whuxl.UUCP> mike@whuxl.UUCP (BALDWIN) writes: >I think providing *both* aliasing and functions is a misfeature! Why have >two inconsistent ways of doing the same thing??? I agree, which is one of the reasons I'm not putting aliasing in. >"Real" exported functions ala V8 are very nice. However, something like >$ENV can still be useful for things like setting certain options for >all invoked shell (e.g., set -au) or having the prompt show the level >(PS1=">$PS1"). The only way to do these things is with $ENV. My first go 'round used $HOME/.shrc, ala the csh. This time I am implementing $ENV, like the ksh. Also checking for ./.profile and them $HOME/.profile, like the ksh. Exported functions would be real nice, but I don't think I'm going to have time to try and figure that one out. >Back to my first point: please don't implement something 2 or 3 times >in different ways! Agreed! Everything that I will add that is ksh compatible will have the same syntax and semantics (or as near as I can make it, without a ksh to check against). If I add something to the shell that is similar but not exactly the same as the ksh, it will have a DIFFERENT syntax, so that you know you're doing something non-standard. (I do have a ksh man page, obtained from AT&T, with the help of David Korn and the folks at the toolchest. Don't go flooding them with requests for it, though.) > ....Functions subsume aliases very nicely, so chuck >aliases! Don't have funny % sequences in prompt strings when `uname` >or `pwd` will work fine. The problem is that PS1="`pwd` " will only evaluate pwd once, and one would want whatever the directory is now. Same with PS1="$PWD ". Which is why I use funny % sequences. At least no one else uses them. > I.e., if pwd is slow, build pwd into the shell instead >of adding a $PWD or $cwd variable. Once pwd is built in, $PWD is almost trivial (having just done it...) >However, instead of building in fd2 >(remember fd2?), extend redirection to include file descriptors. I do indeed remember fd2, on a pdp-11/70 running INTERactive Systems IS/1 (A V6, sort of, look alike. Really bad) > Michael Baldwin Anyway, I'm not really arguing, but since the ksh isn't public domain, I will do my best to be as compatible with it as I can, and when I add features, they will have a different syntax than the ksh. My goal is not replace or denigrate what David Korn has done; but to fill a gap out there for those who can't get the ksh, and who, on BSD systems, don't like the csh. -- Arnold Robbins CSNET: arnold@gatech ARPA: arnold%gatech.csnet@csnet-relay.arpa UUCP: { akgua, allegra, hplabs, ihnp4, seismo, ut-sally }!gatech!arnold Real Unix hackers disdain wimpy languages like C and AWK in favor of /bin/sh.