From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14493 invoked from network); 17 Jun 2008 09:39:15 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.4 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Jun 2008 09:39:15 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 28755 invoked from network); 17 Jun 2008 09:39:11 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jun 2008 09:39:11 -0000 Received: (qmail 13548 invoked by alias); 17 Jun 2008 09:39:08 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25171 Received: (qmail 13535 invoked from network); 17 Jun 2008 09:39:07 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Jun 2008 09:39:07 -0000 Received: from mail.o2.co.uk (yoda.london.02.net [82.132.130.151]) by bifrost.dotsrc.org (Postfix) with ESMTP id B21AF8028AC3 for ; Tue, 17 Jun 2008 11:39:01 +0200 (CEST) Received: from sc.homeunix.net (78.105.216.138) by mail.o2.co.uk (8.0.013.3) (authenticated as stephane.chazelas) id 4851DD9500BF9C37; Tue, 17 Jun 2008 10:39:00 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1K8XeW-0001gc-0o; Tue, 17 Jun 2008 10:39:00 +0100 Date: Tue, 17 Jun 2008 10:39:00 +0100 From: Stephane Chazelas To: =?iso-8859-15?Q?J=F6rg?= Sommer Cc: zsh-workers@sunsite.dk Subject: Re: environment settings Message-ID: <20080617093859.GB5016@sc.homeunix.net> Mail-Followup-To: =?iso-8859-15?Q?J=F6rg?= Sommer , zsh-workers@sunsite.dk References: <20080616074651.GB26165@marcus> <20080616080556.GA5091@sc.homeunix.net> <20080616123045.GC26165@marcus> <20080616124450.GC5091@sc.homeunix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.5.16 (2007-09-19) X-Virus-Scanned: ClamAV 0.92.1/7494/Tue Jun 17 06:46:03 2008 on bifrost X-Virus-Status: Clean On Tue, Jun 17, 2008 at 08:33:02AM +0000, Jörg Sommer wrote: [...] > > Which in a way makes sense though is not very useful. ~/.zshrc > > is your shell configuration file. ~/.zprofile is you session > > configuration file. > > > > Generally, in ~/.zshrc, you put stuff that affects the behavior > > of interactive shells (sets shell options, defines shell > > aliases, configure completions). > > > > In ~/.zprofile, you define what affects any process started in > > your session not necessarily only the shell processes. > > And what's the meaning of .zshenv? I use it for my environment variables > like EDITOR, because my session is started by X. [...] My understanding is that ~/.zshenv is for hacking in situations where you can't do otherwise. Your X login procedure should source your .zprofile or some file that is sourced by your .zprofile if you want the same settings in X sessions and non-X sessions. Or it should source/read another session config file that defines env variables. .zshenv is to fix up situations where it's not possible in my opinion. It's like the SHELLOPTS, BASH_ENV variables with bash or ENV with some kshs, it should be used with extreme care and probably not permanently. Now, that's one way to see things. You can have a different approach where .zshenv is central, but my feeling is that it's asking for trouble. -- Stéphane