From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14412 invoked from network); 31 Dec 2002 02:00:52 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 31 Dec 2002 02:00:52 -0000 Received: (qmail 22393 invoked by alias); 31 Dec 2002 02:00:47 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18041 Received: (qmail 22374 invoked from network); 31 Dec 2002 02:00:46 -0000 Subject: Bug/Caveat for local variables in functions To: zsh-workers@sunsite.dk From: tim_smithers@mlc.com.au Date: Tue, 31 Dec 2002 12:54:59 +1100 Message-ID: X-MIMETrack: Serialize by Router on NTHNS026/AU1/MLCESF(Release 5.0.5 |September 22, 2000) at 31/12/2002 13:02:50 MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii Hi, This is either a bug, or something which maybe should be noted as not able to be done in the man page. You can't create a local variable with the same name as a special var. Eg: testit() { local path=foo echo $path } this echo's your path, not 'foo'. You don't get any warnings about the assignment not working etc. The main reason I found it was porting some shell which works in ksh and bash to zsh compliant (which has a "path" variable). Regards, - Tim The information contained in this e-mail communication may be confidential. You should only read, disclose, re-transmit,copy, distribute, act in reliance on or commercialise the information if you are authorised to do so. If you are not the intended recipient of this e-mail communication, please immediately notify us by e-mail to postmaster@mlc.com.au, or reply by e-mail direct to the sender and then destroy any electronic and paper copy of this message. Any views expressed in this e-mail communication are those of the individual sender, except where the sender specifically states them to be the views of a member of the National Australia Bank Group of companies. The National Australia Bank Group of companies does not represent, warrant or guarantee that the integrity of this communication has been maintained nor that the communication is free of errors, virus or interference.