From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7634 invoked from network); 29 Mar 1999 01:58:41 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Mar 1999 01:58:41 -0000 Received: (qmail 11892 invoked by alias); 29 Mar 1999 01:58:02 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2250 Received: (qmail 11882 invoked from network); 29 Mar 1999 01:57:58 -0000 From: "Bart Schaefer" Message-Id: <990328175751.ZM8402@candle.brasslantern.com> Date: Sun, 28 Mar 1999 17:57:51 -0800 In-Reply-To: <5logldgt3m.fsf@tequila.cs.yale.edu> Comments: In reply to Stefan Monnier "Re: zsh startup files" (Mar 28, 5:14pm) References: <5l90cmijvs.fsf@tequila.cs.yale.edu> <19990324181547.A4700@astaroth.nit.gwu.edu> <5l7ls6iee4.fsf@tequila.cs.yale.edu> <199903250220.VAA12122@gypsy.cad.gatech.edu> <19990325005332.B5194@astaroth.nit.gwu.edu> <9903250903.AA30753@ibmth.df.unipi.it> <9903251002.AA18225@ibmth.df.unipi.it> <199903251055.LAA02436@sally.ifm.uni-kiel.de> <9903251117.AA09841@rouble.olsen.ch> <9903251122.AA14741@ibmth.df.unipi.it> <5l1zidiw46.fsf@tequila.cs.yale.edu> <9903251400.AA54287@ibmth.df.unipi.it> <5lyaklgy2w.fsf@tequila.cs.yale.edu> <990327170423.ZM3271@candle.brasslantern.com> <5logldgt3m.fsf@tequila.cs.yale.edu> X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-users@sunsite.auc.dk Subject: Re: zsh startup files MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Mar 28, 5:14pm, Stefan Monnier wrote: } Subject: Re: zsh startup files } } >>>>> "Bart" == Bart Schaefer writes: } > The idea behind interleaving the user and system init files is } > so that, at each decision point in the system administrator's } > initialization chain, the user gets a chance to step in and change } > the details with his own initialization. } } Sounds nice in theory, but how about practice ? Let me first point out that none of this is interesting for non-interactive shells. So when you later say: } > (3) Use "exec" in .zshenv or .zprofile as I described above. } } Note that this `exec' solution cannot be used for the case of commands } executed from `rsh'. I say, so what? Only the two zshenv files are being sourced in that case anyway. } Could you give a (few) example(s) where the interleaving is beneficial ? The canonical example of this being useful is terminal setup, which is frequently done in /etc/profile on SVR4 systems (Motorola, Data General, Olivetti, NCR, etc., where Bourne shell is often still the default shell) and which a sysadmin is therefore likely to place in /etc/zprofile. Settings in zshrc and zlogin (whether /etc/ or ~/.) may depend on correct values of TERM, LINES, and COLUMNS; it's too late to fix them after the entire system initialization has run (without duplicating the parts that rely on them), but too early to fix them before /etc/zprofile. I could come up with other examples, but they'd all be of that same shape. Yes, in some cases it might be necessary to set your $path in .zshenv and then set it again in .zlogin, or whatever. The point is that if you care about what happens in between in /etc/z*, rather than simply wanting to skip it entirely and do only your own stuff, then you need to get your shot at it both before and after. } It seems it just makes it easy to make changes that don't have the intended } effect because other code is executed afterwards. } } Ignoring NO_RCS after /etc/zshenv doesn't seem to make anything easier for } novices but does seem to make things much harder for the experienced user. I entirely agree that if what you want is for that other code to NOT run, then the current startup file system is deficient. That's a different issue from running the code in some other order. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com