From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9023 invoked from network); 5 Jun 2002 10:57:37 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 5 Jun 2002 10:57:37 -0000 Received: (qmail 11172 invoked by alias); 5 Jun 2002 10:57:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17290 Received: (qmail 11159 invoked from network); 5 Jun 2002 10:57:19 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: PATCH: function parsing In-reply-to: "Bart Schaefer"'s message of "Tue, 04 Jun 2002 09:33:15 PDT." Date: Wed, 05 Jun 2002 11:56:49 +0100 Message-ID: <14234.1023274609@csr.com> From: Peter Stephenson Bart Schaefer wrote: > While you're at it, any chance you can "fix" redirections following a > function definition? E.g. per ksh (and possibly per posix) this: > > func() { less } < /etc/termcap > > should be equivalent to this: > > func() { { less } < /etc/termcap } I've played with it for a little without success. I've come to the conclusion the only way to do it will be to rewrite it internally exactly how you've shown it --- i.e. insert a current-shell construct (the normal effect of braces) inside the list construct and attach the redirection to that, but it's a bit of a mess unless we always parse functions as a current-shell construct. Maybe later. -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 392070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************