From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6961 invoked by alias); 14 Sep 2011 17:36:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16351 Received: (qmail 24107 invoked from network); 14 Sep 2011 17:36:31 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.215.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=8tpeM5fP6bXCfCVBZlEEotjp14OhSW6tMJxUfDQzsME=; b=sWbf/3XCn/rA45nf5KjOTg6siNFwj8tKgp/JCR8zcji+iejYEWibda5mkbWhqsPqSF whBZrbHR2iG7+DCVbOVI8qI9pSoKeOz7SdoZk3elHuYqlujzYpJGhnnAWw6qk3w76UY6 j+6OitHm2W3qNu6ozw/oGOUN5mNg5kQYLF0QE= MIME-Version: 1.0 In-Reply-To: <20110914172148.GA7325@yahoo.fr> References: <20110914172148.GA7325@yahoo.fr> Date: Wed, 14 Sep 2011 19:36:23 +0200 Message-ID: Subject: Re: {fd}< and compound commands From: Mikael Magnusson To: zsh-users@zsh.org Content-Type: text/plain; charset=UTF-8 On 14 September 2011 19:21, Stephane Chazelas wrote: > Hiya, > > $ echo $ZSH_VERSION > 4.3.12 > $ zsh -c '{echo foo >&$fd;} {fd}> a' > zsh:1: parse error near `{' > (same for while/do/done constructs at least) > > Is that the expected behavior? I can't see it being documented. > > That would be useful in > > while read <&$fd var; do > ... > done {fd}< file > > to avoid having to worry about overriding fds 3-9. Is this related to http://www.zsh.org/mla/workers/2011/msg01090.html (and reply from pws)? -- Mikael Magnusson