From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25979 invoked from network); 8 Dec 1997 16:31:49 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 8 Dec 1997 16:31:49 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id LAA12321; Mon, 8 Dec 1997 11:15:16 -0500 (EST) Resent-Date: Mon, 8 Dec 1997 11:13:57 -0500 (EST) From: "Bart Schaefer" Message-Id: <971208081406.ZM2949@candle.brasslantern.com> Date: Mon, 8 Dec 1997 08:14:06 -0800 In-Reply-To: <199712081042.FAA01749@luomat.peak.org> Comments: In reply to Timothy J Luoma "help with understanding diffs in startup files" (Dec 8, 5:42am) References: <199712081042.FAA01749@luomat.peak.org> <199712081115.LAA29680@taos.demon.co.uk> <199712081124.GAA02299@luomat.peak.org> <199712081211.MAA31918@taos.demon.co.uk> In-Reply-To: <199712081115.LAA29680@taos.demon.co.uk> Comments: In reply to Andrew Main "Re: help with understanding diffs in startup files" (Dec 8, 11:15am) In-Reply-To: <199712081124.GAA02299@luomat.peak.org> Comments: In reply to Timothy J Luoma "Re: help with understanding diffs in startup files" (Dec 8, 6:24am) In-Reply-To: <199712081211.MAA31918@taos.demon.co.uk> Comments: In reply to Andrew Main "Re: help with understanding diffs in startup files" (Dec 8, 12:11pm) X-Mailer: Z-Mail (4.0b.820 20aug96) To: zsh-users@math.gatech.edu Subject: Re: help with understanding diffs in startup files MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"r5GV_3.0.m_2.4p1Zq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1189 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Dec 8, 5:42am, Timothy J Luoma wrote: } Subject: help with understanding diffs in startup files } } Well, there's this Linux account I have where there is some system file } which is setting up some variables after my .zshenv. Really annoying. Sun } and NeXT have never had this problem. On Dec 8, 11:15am, Andrew Main wrote: } } It is a particular problem with Slackware. On Dec 8, 6:24am, Timothy J Luoma wrote: } } This is Redhat I think The contributed binary RPM for zsh-3.0.5 installs system-wide init files in the directory /etc/zsh/: /etc/zsh/zlogin /etc/zsh/zlogout /etc/zsh/zprofile /etc/zsh/zshenv /etc/zsh/zshrc I haven't looked to see what's in each of them, because I build zsh myself, so I didn't install the binary RPM. On Dec 8, 12:11pm, Andrew Main wrote: } Subject: Re: help with understanding diffs in startup files } } Timothy J Luoma wrote: } >I've always just used one init file. Perhaps this would be a good time to } >learn what should go in what file. } } Actually, the division isn't that simple. .zshenv should set up your } normal shell environment, including many options, most functions and } most variables. .zshrc should set up your interactive shell environment, } including many options, all bindkeys and compctls, aliases, and functions } and variables that are only used interactively (such as compctl functions } and $HISTCHARS). .zprofile (or .zlogin if you prefer) should contain } commands to run when you log in, and should not affect the environment } at all. I agree with everything but the last clause. There's no reason to say that .zprofile or .zlogin should not affect the environment; they should contain commands, possibly including environment settings, that need to happen at least once when you log in, but that then remain constant. For example, my .zlogin does a number of tests of what host type I'm on, what software is installed at what versions and where, and so on, and manipulates the environment accordingly. But that doesn't need to happen every time I start any interactive shell -- unless of course a misguided /etc/zshrc steps on my changes every time. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com