From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10541 invoked from network); 18 Jul 2000 16:37:53 -0000 Received: from unknown (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Jul 2000 16:37:53 -0000 Received: (qmail 3937 invoked by alias); 18 Jul 2000 16:37:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 12301 Received: (qmail 3928 invoked from network); 18 Jul 2000 16:37:29 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: "Andrej Borsenkow" To: , Subject: RE: PATCH: Re: adding a toplevel zsh.spec.in file Date: Tue, 18 Jul 2000 20:37:26 +0400 Message-ID: <000e01bff0d6$752db2e0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 In-Reply-To: > > /etc/profile is there to set up bits of the environment that > pertain to > the local system. It's an adjunct to login; it does the new > mail check > on systems where login doesn't, it sets MAIL if login > doesn't, and it can > set TAPE and stuff if that's really necessary on that system. > My point is > that the things that need to be done are the same regardless > of what shell > the user prefers to use, and so there shouldn't be any > zsh-specific stuff. > > Andrej Borsenkow wrote: > > Perhaps we can locally emulate sh when sourcing /etc/profile? We have > the local emulation logic working for functions, and > /etc/profile can't > possibly get confused by that, because it can't contain any setopt > commands. The $0 issue remains. What does $0 get examined for? > Pretty much everything that you described above + output of /etc/motd, setting terminals parameter depending of terminal type (there are several standard ones that are normally shipped with systems) happens under case $0 in -sh|-ksh|-jsh|-rsh) Do not ask me why; I have not written it and have no chance to change it. Actually, since I'm running under X I do not care about /etc/profile anymore; it is sourced by Xsession so environment gets set up anyway (to account for optional software that may add something to /etc/profile) and I do not care about setting terminal under dtterm :-) So, unless this is an issue on more than one system, we can probably ignore it. But if we are going to locally emulate /bin/sh - why not pretend, we *are* -sh? :-) -andrej