From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from margay.cs.wisc.edu ([128.105.2.236]) by archone.tamu.edu with SMTP id <22531>; Fri, 23 Aug 1991 11:51:19 -0500 From: dws@cs.wisc.edu (DaviD W. Sanderson) Message-Id: <9108231651.AA27879@margay.cs.wisc.edu> Received: by margay.cs.wisc.edu; Fri, 23 Aug 91 11:51:11 -0500 Subject: Re: early reaction(s) to rc To: rc@archone.tamu.edu Date: Fri, 23 Aug 1991 11:51:08 -0500 X-Mailer: ELM [version 2.3 PL11] > the matter at any length. (On a point of pure gustation, I do have to > say I don't like the name much -- but on the other hand I can't think of > a better one right now either: the obvious sigbegin doesn't appeal, > and sigenter (as the antonym of sigexit) doesn't sound right either. > Suggestions, any rcer's?) How about "sigmain", analogous to the entry function for C programs (and nicely parallel to "sigexit".) Unfortunately not all the special functions in rc have names beginning with "sig", though they would if "prompt" were changed to "sigprompt". This would allow a useful convention: ``all special functions in rc have names beginning with "sig"''. > As a quite separate issue I'd like to address the question of telling > whether or not the shell is interactive. sh has $-, and $- has many I have suggested to Byron making the rc flags available in a special variable. I think the Plan 9 rc does this, but I don't have my docs handy to check. > that rc has no "set" builtin (or equivalent mechanism). Byron, in > the eventual revamp of rc -x, you might like to consider that it > is not at all unreasonable to want to turn -x off and on at different > points during execution. Yes, I think it would be useful to be able to toggle certain command-line switches. Often I am interested in debugging only part of a script, and being able to selectively turn on -x has helped in sh. I dunno what a reasonable syntax might be. > This is what I fail to follow; I don't understand why one needs to tell > whether or not the shell is interactive in order to accomplish the goal > of making a root prompt be something arbitrary. There is another possible application: I might want to remove something from the environment if the shell is NOT interactive. This could be a way (albeit a bit clumsy) to get around the fact that all variables are exported into the environment. DaviD W. Sanderson (dws@cs.wisc.edu)