From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 4759 invoked by alias); 11 Feb 2015 17:46:31 -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: 19859 Received: (qmail 15241 invoked from network); 11 Feb 2015 17:46:19 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7fc86d0000066b7-09-54db94d2be0f Date: Wed, 11 Feb 2015 17:46:05 +0000 From: Peter Stephenson To: Zsh Users Subject: Re: multi-digit file descriptors Message-id: <20150211174605.43e6da33@pwslap01u.europe.root.pri> In-reply-to: References: <20150211162637.GA9083@xvii.vinc17.org> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKLMWRmVeSWpSXmKPExsVy+t/xa7qXptwOMThwVN1ix8mVjA6MHqsO fmAKYIzisklJzcksSy3St0vgypjz6zJbwUy2ipldc9gaGB+zdDFyckgImEh8XP2JDcIWk7hw bz2QzcUhJLCUUeLi3s/MIAkhgUVMEm1N1RCJbYwSZ/YcYgRJsAioSmzdf4oVxGYTMJSYumk2 WFxEQFHizK9vTCC2sICmxNEdX8G28QrYS/w50AwW5xQIlnh57hw7xIIqiaZJz8CW8QvoS1z9 +4kJ4iJ7iZlXzjBC9ApK/Jh8D2wOs4CWxOZtTawQtrzE5jVvoQ5Vl7hxdzf7BEahWUhaZiFp mYWkZQEj8ypG0dTS5ILipPRcI73ixNzi0rx0veT83E2MkKD9uoNx6TGrQ4wCHIxKPLwWMbdC hFgTy4orcw8xSnAwK4nw3uq4HSLEm5JYWZValB9fVJqTWnyIkYmDU6qBUXHPHvOQI98j0qtW vUm6/k72h7rowm0rJL9tefJxsfqelyt5Znm0yuZMTF1Sd4UtdFHzu1Zhj8d6bw0bO/aFVnjW WmQYTFDI2ebg/ejVxtYNh47V/tukxMWv/uzhtFtX3t1qtP0/RzdWo/mZ78E4ziubmrIsF2XN 29vIcNwvyP2VWP4a6ePbhZVYijMSDbWYi4oTATXAD3g4AgAA On Wed, 11 Feb 2015 09:27:51 -0800 Bart Schaefer wrote: > On Feb 11, 2015 8:28 AM, "Vincent Lefevre" wrote: > > > > The behavior of dash and ksh93 is similar to zsh. But is there any > > reason? > > Zsh reserves descriptors 10 and up for internal use; for example, 10 is > nearly always a copy of the original input terminal in an interactive shell. You can grab use of one yourself with the recommended syntax (we actually agreed this with David Korn): local foo exec {foo}>blah echo bleugh >&$foo and given what Bart mentioned we wouldn't be that keen to open it up more widely. Note there's nothing magic about foo, it just contains a number. So you can do local foo=12 exec {foo}>&- etc. pws