From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2996 invoked from network); 17 Jun 2008 12:58:46 -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 12:58:46 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 17518 invoked from network); 17 Jun 2008 12:58:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jun 2008 12:58:41 -0000 Received: (qmail 5014 invoked by alias); 17 Jun 2008 12:58:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25188 Received: (qmail 5003 invoked from network); 17 Jun 2008 12:58:38 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Jun 2008 12:58:38 -0000 Received: from mail.o2.co.uk (sidious.london.02.net [82.132.130.152]) by bifrost.dotsrc.org (Postfix) with ESMTP id 58EA580525A5 for ; Tue, 17 Jun 2008 14:58:35 +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 4851DD9500C7A59D; Tue, 17 Jun 2008 13:58:34 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1K8ale-0002Dk-FF; Tue, 17 Jun 2008 13:58:34 +0100 Date: Tue, 17 Jun 2008 13:58:34 +0100 From: Stephane Chazelas To: zsh-workers@sunsite.dk, =?iso-8859-15?Q?J=F6rg?= Sommer Subject: Re: environment settings Message-ID: <20080617125834.GI5016@sc.homeunix.net> Mail-Followup-To: zsh-workers@sunsite.dk, =?iso-8859-15?Q?J=F6rg?= Sommer References: <20080616074651.GB26165@marcus> <20080616080556.GA5091@sc.homeunix.net> <20080616123045.GC26165@marcus> <20080616124450.GC5091@sc.homeunix.net> <20080617093859.GB5016@sc.homeunix.net> <20080617104126.GC10734@prunille.vinc17.org> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20080617104126.GC10734@prunille.vinc17.org> 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 12:41:26PM +0200, Vincent Lefevre wrote: > On 2008-06-17 10:39:00 +0100, Stephane Chazelas wrote: > > My understanding is that ~/.zshenv is for hacking in situations > > where you can't do otherwise. > > I completely disagree. ~/.zshenv is useful to define environment > variables when the first zsh shell isn't always a login shell, in > which case ~/.zprofile isn't read (e.g. when the user's main shell > is not zsh and zsh is executed from that shell, or when one uses > ssh + command; the user shouldn't be forced to use the -l flag). > This is also better than the ~/.zprofile when the user often > changes his config files and doesn't want to logout and login > again (meaning quitting the X session...). > > Moreover ~/.zshenv is useful to define things that are not exported, > such as shell variables, named directories and so on, that can also > be used in non-interactive shells. [...] And I still think that would be a dirty hack and asking for trouble. Changing the behavior of every zsh instance, even the instances that run script that you've not written is very bad practice IMO especially when you consider that the behavior is only affected for the processes that have your euid. So, it has its uses, but mainly for non-normal operation, when you can't be bothered or don't have the right to do the /right thing/. -- Stéphane