From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26722 invoked from network); 17 Jun 2008 13:26:20 -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 13:26:20 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 29427 invoked from network); 17 Jun 2008 13:26:18 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jun 2008 13:26:18 -0000 Received: (qmail 19934 invoked by alias); 17 Jun 2008 13:26:16 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25192 Received: (qmail 19923 invoked from network); 17 Jun 2008 13:26:15 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Jun 2008 13:26:15 -0000 Received: from mail.o2.co.uk (sidious.london.02.net [82.132.130.152]) by bifrost.dotsrc.org (Postfix) with ESMTP id 1577F8028AC3 for ; Tue, 17 Jun 2008 15:26:12 +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 4851DD9500C8E7D6; Tue, 17 Jun 2008 14:26:11 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1K8bCN-0002Ii-HZ; Tue, 17 Jun 2008 14:26:11 +0100 Date: Tue, 17 Jun 2008 14:26:11 +0100 From: Stephane Chazelas To: zsh-workers@sunsite.dk, =?iso-8859-15?Q?J=F6rg?= Sommer Subject: Re: environment settings Message-ID: <20080617132611.GL5016@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> <20080617125834.GI5016@sc.homeunix.net> <20080617131154.GM10734@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: <20080617131154.GM10734@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 03:11:54PM +0200, Vincent Lefevre wrote: > On 2008-06-17 13:58:34 +0100, Stephane Chazelas wrote: > > 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. > > If scripts I've not written expect that [some program] is available > in $PATH, then the user may need to add directories to $PATH in his > .zshenv (e.g. because [some program] has been installed by the user > himself in his home directory). [...] So, you have a script that expects a $PATH that is different from the system's $PATH, and your solution is to update the ~/.zshenv for every user that is meant to run that script, and by doing so, possibly affecting the behavior of all the other zsh scripts that those users may run? It seems to me that the /right thing/ would be to update the script (or write a wrapper that sets $PATH if it's a binary file instead of a script), or update the system's $PATH. But you can always put it in ~/.zshenv if you can't be bothered or if you don't have the right to update the system's $PATH. Moreover, if you do path+=(/some/path) in ~/.zshenv, you'll soon end up with /some/path dupplicated. -- Stéphane