Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: for syntax differences from ksh
- X-seq: zsh-users 1088
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxx>
- To: sweth@xxxxxxxxxxxxxxxxxx (Sweth Chandramouli), zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: for syntax differences from ksh
- Date: Fri, 17 Oct 1997 08:44:33 -0700
- In-reply-to: <199710170925.KAA05948@xxxxxxxxxxxxxxxx>
- References: <199710170925.KAA05948@xxxxxxxxxxxxxxxx>
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author