From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 879 invoked from network); 14 Apr 2005 04:58:05 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 14 Apr 2005 04:58:05 -0000 Received: (qmail 97931 invoked from network); 14 Apr 2005 04:57:59 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 14 Apr 2005 04:57:59 -0000 Received: (qmail 6773 invoked by alias); 14 Apr 2005 04:57:56 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21137 Received: (qmail 6762 invoked from network); 14 Apr 2005 04:57:55 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 14 Apr 2005 04:57:55 -0000 Received: (qmail 97570 invoked from network); 14 Apr 2005 04:57:55 -0000 Received: from vms040pub.verizon.net (206.46.252.40) by a.mx.sunsite.dk with SMTP; 14 Apr 2005 04:57:51 -0000 Received: from candle.brasslantern.com ([4.11.1.68]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0IEX009N474DPK32@vms040.mailsrvcs.net> for zsh-workers@sunsite.dk; Wed, 13 Apr 2005 23:57:50 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j3E4vmfw013553 for ; Wed, 13 Apr 2005 21:57:49 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j3E4vmxB013552 for zsh-workers@sunsite.dk; Wed, 13 Apr 2005 21:57:48 -0700 Date: Thu, 14 Apr 2005 04:57:48 +0000 From: Bart Schaefer Subject: Re: PATCH: allocating a new file descriptor In-reply-to: <200504121257.j3CCvkXr003286@news01.csr.com> To: zsh-workers@sunsite.dk (Zsh hackers list) Message-id: <1050414045748.ZM13551@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: <200504121257.j3CCvkXr003286@news01.csr.com> Comments: In reply to Peter Stephenson "PATCH: allocating a new file descriptor" (Apr 12, 1:57pm) X-Spam-Checker-Version: SpamAssassin 3.0.2 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, score=-2.6 required=6.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.2 X-Spam-Hits: -2.6 On Apr 12, 1:57pm, Peter Stephenson wrote: } } This gives us much better encapsulation for manipulating file } descriptors, something along the lines of files or file handles in } other languages. I think some oddball behaviors here might be considered bugs. For example, print foo {myfd}>/dev/null assigns a new fd to $myfd, but does not redirect the output of "print" to it, and leaves it open after "print" is finished. Futher, executing the same command again assigns a second new fd to $myfd but leaves the first one "dangling" (no way to close it, because you no longer know what its number is). I don't think Korn's summary implied either of these behaviors, but if it does they should probably be brought to his attention. } The shell checks that the braces only contain valid characters for a } parameter ID, so the only likely clash with this syntax is for avid } users of the BRACE_CCL option where {myfd}>~/tmp/logfile would perform a } normal redirection Perhaps setopt BRACE_CCL should simply disable/override this behavior?