From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18340 invoked from network); 17 Jun 2008 14:26:16 -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 14:26:16 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 58647 invoked from network); 17 Jun 2008 14:26:10 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Jun 2008 14:26:10 -0000 Received: (qmail 23780 invoked by alias); 17 Jun 2008 14:26:07 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 25194 Received: (qmail 23767 invoked from network); 17 Jun 2008 14:26:06 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Jun 2008 14:26:06 -0000 Received: from mail.o2.co.uk (jabba.london.02.net [82.132.130.169]) by bifrost.dotsrc.org (Postfix) with ESMTP id A0A698028AC3 for ; Tue, 17 Jun 2008 16:25:59 +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 4851DD9500CAA9EF; Tue, 17 Jun 2008 15:25:57 +0100 Received: from chazelas by sc.homeunix.net with local (Exim 4.69) (envelope-from ) id 1K8c8D-0002Vy-61; Tue, 17 Jun 2008 15:25:57 +0100 Date: Tue, 17 Jun 2008 15:25:57 +0100 From: Stephane Chazelas To: Mikael Magnusson Cc: zsh-workers@sunsite.dk Subject: Re: environment settings Message-ID: <20080617142557.GO5016@sc.homeunix.net> Mail-Followup-To: Mikael Magnusson , zsh-workers@sunsite.dk References: <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> <20080617132611.GL5016@sc.homeunix.net> <237967ef0806170628m56b80d3anaf252e68ad6c497d@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <237967ef0806170628m56b80d3anaf252e68ad6c497d@mail.gmail.com> 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:28:20PM +0200, Mikael Magnusson wrote: > 2008/6/17 Stephane Chazelas : > > Moreover, if you do > > > > path+=(/some/path) > > in ~/.zshenv, you'll soon end up with /some/path dupplicated. > > typeset -U path [...] Changing the type of $path in ~/.zshenv, that is for all zsh shells (including script interpreters) that this user may run seems dangerous to me. Some scripts might expect $path[-1] to be the last component that they added for instance. Like: path+=("$(some-cmd)") && print -ru2 just added $path[-1] to PATH If something changed the type of $path behind its back, then the above won't work correctly. -- Stéphane