From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27924 invoked from network); 17 Oct 1997 15:54:10 -0000 Received: from ns2.primenet.com.au (7795@203.24.36.3) by ns1.primenet.com.au with SMTP; 17 Oct 1997 15:54:10 -0000 Received: (qmail 1338 invoked from network); 17 Oct 1997 15:54:08 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns2.primenet.com.au with SMTP; 17 Oct 1997 15:54:08 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id LAA17156; Fri, 17 Oct 1997 11:44:51 -0400 (EDT) Resent-Date: Fri, 17 Oct 1997 11:44:28 -0400 (EDT) From: "Bart Schaefer" Message-Id: <971017084433.ZM7615@candle.brasslantern.com> Date: Fri, 17 Oct 1997 08:44:33 -0700 In-Reply-To: <199710170925.KAA05948@taos.demon.co.uk> Comments: In reply to Andrew Main "Re: for syntax differences from ksh" (Oct 17, 10:25am) References: <199710170925.KAA05948@taos.demon.co.uk> X-Mailer: Z-Mail (4.0b.820 20aug96) To: sweth@gwis2.circ.gwu.edu (Sweth Chandramouli), zsh-users@math.gatech.edu Subject: Re: for syntax differences from ksh MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"DYxLF1.0.JB4.SVuHq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1088 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Oct 17, 10:25am, Andrew Main wrote: } Subject: Re: for syntax differences from ksh } } Sweth Chandramouli wrote: } > } >addpath () { } >for pathdir in $*; do } > if test -d $pathdir; then } > PATH=$PATH:$pathdir } > fi; } >done } >} } } This function is correct for zsh. Yes, but I'd recommend PATH=${PATH}:$pathdir because of zsh's `:' variable modifiers. It happens to work here because zsh ignores the `:' when it is not followed by a recognized modifier, but I think it's a bad habit to rely upon that. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com