From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18952 invoked from network); 10 Jul 2001 08:20:28 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Jul 2001 08:20:28 -0000 Received: (qmail 29338 invoked by alias); 10 Jul 2001 08:19:56 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4017 Received: (qmail 29324 invoked from network); 10 Jul 2001 08:19:55 -0000 From: "Bart Schaefer" Message-Id: <1010710081744.ZM28207@candle.brasslantern.com> Date: Tue, 10 Jul 2001 08:17:43 +0000 In-Reply-To: <20010709222813.B15620@hq.newdream.net> Comments: In reply to Will Yardley "$PATH" (Jul 9, 10:28pm) References: <20010709222813.B15620@hq.newdream.net> X-Mailer: Z-Mail (5.0.0 30July97) To: Will Yardley , zsh-users@sunsite.dk Subject: Re: $PATH MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 9, 10:28pm, Will Yardley wrote: } Subject: $PATH } } noticed that if i do something like: } PATH=$PATH:/dh/bin } or whatever, each time i open a new shell (ie if i type 'zsh') my new shell } has the arg appended twice } } is there a simple solution i'm overlooking here? Use the `path' array instead of the PATH scalar, and use `typeset -U'. typeset -U path path=($path /dh/bin) Recent versions of zsh, e.g. 3.1.9/4.0.x, also allow `typeset -U' of a colon-separated scalar like PATH, but the above will work in most 3.0.x versions as well. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net