From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24334 invoked from network); 14 Jan 2003 11:45:35 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Jan 2003 11:45:35 -0000 Received: (qmail 25354 invoked by alias); 14 Jan 2003 11:45:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5710 Received: (qmail 25343 invoked from network); 14 Jan 2003 11:45:21 -0000 Date: Tue, 14 Jan 2003 12:44:26 +0100 From: Roman Neuhauser To: zsh-users@sunsite.dk Subject: Re: aliases not getting expanded inside functions? Message-ID: <20030114114426.GE1196@freepuppy.bellavista.cz> Mail-Followup-To: zsh-users@sunsite.dk References: <15893.53780.524763.695176@fisica.ufpr.br> <20030103185407.GA11836@fysh.org> <15897.15986.562636.628562@fisica.ufpr.br> <1030106125404.ZM4660@candle.brasslantern.com> <15903.36155.716460.639226@fisica.ufpr.br> <1030111184020.ZM11764@candle.brasslantern.com> <15906.65149.206767.381472@fisica.ufpr.br> <1030113184827.ZM21872@candle.brasslantern.com> <15907.12866.732143.310772@fisica.ufpr.br> <1030114051008.ZM23680@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1030114051008.ZM23680@candle.brasslantern.com> User-Agent: Mutt/1.5.1i # schaefer@brasslantern.com / 2003-01-14 05:10:08 +0000: > On Jan 13, 7:40pm, Carlos Carvalho wrote: > } > } >Hrm. I was sure I'd tried it, but on your input I get the same result > } >you do. Well, there's always: > } > > } > IFS=';' eval 'fields=( $=dataline )' > } > } Good, and it also works without the eval: > } > } IFS=';' fields=( $=dataline ) > } > } did it for me. > > Er, yes, I'm sure it did, but I think you'll find that after that line > is finished, IFS remains set to ';'. The `eval' is in there so that IFS > will be automatically reset to its old value after the command finishes. Wouldn't this work? OIFS=$IFS IFS=';' fields=( $=dataline ) IFS=$OIFS That makes the intention obvious IMO. -- If you cc me or remove the list(s) completely I'll most likely ignore your message. see http://www.eyrie.org./~eagle/faqs/questions.html