From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19482 invoked from network); 17 Nov 2008 15:51:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 17 Nov 2008 15:51:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 66877 invoked from network); 17 Nov 2008 15:51:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 17 Nov 2008 15:51:31 -0000 Received: (qmail 4227 invoked by alias); 17 Nov 2008 15:51:25 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 26054 Received: (qmail 4216 invoked from network); 17 Nov 2008 15:51:24 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 17 Nov 2008 15:51:24 -0000 Received: from vms173007pub.verizon.net (vms173007pub.verizon.net [206.46.173.7]) by bifrost.dotsrc.org (Postfix) with ESMTP id 9A62180524C4 for ; Mon, 17 Nov 2008 16:51:19 +0100 (CET) Received: from torch.brasslantern.com ([96.238.220.215]) by vms173007.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0KAH007H3INMJAI0@vms173007.mailsrvcs.net> for zsh-workers@sunsite.dk; Mon, 17 Nov 2008 09:50:11 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id mAHFpADi006759 for ; Mon, 17 Nov 2008 07:51:10 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id mAHFp9dH006758 for zsh-workers@sunsite.dk; Mon, 17 Nov 2008 07:51:09 -0800 Date: Mon, 17 Nov 2008 07:51:09 -0800 From: Bart Schaefer Subject: Re: parse error in process substitution In-reply-to: <20081117101031.17dcf2b7@news01> To: "Zsh Hackers' List" Message-id: <081117075109.ZM6757@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <200811162118.mAGLIgK5003632@pws-pc.ntlworld.com> <081116135129.ZM5711@torch.brasslantern.com> <20081117101031.17dcf2b7@news01> Comments: In reply to Peter Stephenson "Re: parse error in process substitution" (Nov 17, 10:10am) X-Virus-Scanned: ClamAV 0.92.1/8642/Mon Nov 17 05:01:08 2008 on bifrost X-Virus-Status: Clean On Nov 17, 10:10am, Peter Stephenson wrote: } Subject: Re: parse error in process substitution } } > schaefer[509] echo $(<(echo cat)) } > zsh: permission denied: /proc/self/fd/10 } > } > I wonder if the $(< ....) form should also be special-cased? } } Possibly, although you could also argue that if the contents look like } anything other than < followed by something that expands to a string } it should do that. The question is whether "$(<" binds more tightly than "<(". I suppose the answer is that really it's dollar oparen redirect word cparen that has special meaning, and in lessthan oparen list cparen, lessthan is not a redirect even though it "looks like" one (because "<(" is a token unto itself, not the two tokens lessthan and oparen). } It depends what you mean by "look like". You need to quote } metacharacters to be sure of getting a file name in general, of } course. schaefer[502] bash [schaefer@torch]$ echo < (echo cat) bash: syntax error near unexpected token `(' [schaefer@torch]$ exit schaefer[503] echo < (echo cat) zsh: number expected schaefer[504] echo $(< (echo cat) ) zsh: no such file or directory: (echo cat) schaefer[505] echo $(<(echo cat) ) zsh: permission denied: /proc/self/fd/10 I'm not really making anything of the above yet, just pointing it out.