From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from imr1.aus.deuba.com ([203.0.62.7]) by hawkwind.utcs.toronto.edu with SMTP id <75644>; Tue, 26 Feb 2002 21:06:44 -0500 Received: from bmr1-e1.aus.deuba.com by imr1.aus.deuba.com id g1R1kOhL028917; Wed, 27 Feb 2002 12:46:24 +1100 (EST) Received: from mailhost.aus.deuba.com by bmr1-e1.aus.deuba.com id g1R1kNcK005477; Wed, 27 Feb 2002 12:46:24 +1100 (EST) Received: from merton.aus.deuba.com (merton.aus.deuba.com [10.179.88.22]) by mailhost.aus.deuba.com (8.9.1/8.9.1) with SMTP id MAA09747 for ; Wed, 27 Feb 2002 12:46:23 +1100 (EST) Received: (qmail 10431 invoked by uid 107); 27 Feb 2002 01:46:23 -0000 Message-ID: <20020227014623.10430.qmail@merton.aus.deuba.com> From: callum.gibson@db.com Subject: Re: non login "rc" needs customized environment To: rc@hawkwind.utcs.utoronto.ca (rc Shell) Date: Tue, 26 Feb 2002 20:46:23 -0500 In-Reply-To: <20020215140436.28162.qmail@happy.star.le.ac.uk> from "tjg@star.le.ac.uk" at Feb 15, 2002 09:04:36 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit tjg@star.le.ac.uk writes: }4. I'm not at all keen to introduce any more compile-time options. } This implies that we must seek a solution which is acceptable to } everybody (or almost everybody). It seems to me the default is backwards. Due to rc being invoked from various place over which you may not have control (and hence can't add the -l flag), rc should by default read .rcrc (or something). It is easy to avoid reading it by adding a test to the first line, eg. (using the level count variable someone suggested): ~ $rclvl () && { rclvl=1 #rest of your usual .rcrc - put it in a file if you want and source it #like this . .rclogin } || { rclvl=`{expr $rclvl + 1} # other stuff you might want to do every time. } We don't need a maze of twisty dot files, just one which is always read. Since rc stuffs everything in environment variables things are inherited by sub-rc-shells anyway, including functions. Of course, the major problem is that this isn't backwards compatible. What it _does_ allow is a choice between whether you get the startup files or not, which the current default does not allow for. C (c)2002 Callum Gibson callum.gibson@db.com Global Markets IT, Deutsche Bank, Australia 61 2 9258 1620 ### The opinions in this message are mine and not Deutsche's ###