From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25852 invoked from network); 18 Aug 2007 09:46:48 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,URIBL_RHS_DOB autolearn=no version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Aug 2007 09:46:48 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 54033 invoked from network); 18 Aug 2007 09:46:42 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Aug 2007 09:46:42 -0000 Received: (qmail 13289 invoked by alias); 18 Aug 2007 09:46:39 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23777 Received: (qmail 13279 invoked from network); 18 Aug 2007 09:46:38 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Aug 2007 09:46:38 -0000 Received: (qmail 53724 invoked from network); 18 Aug 2007 09:46:38 -0000 Received: from mtaout03-winn.ispmail.ntl.com (81.103.221.49) by a.mx.sunsite.dk with SMTP; 18 Aug 2007 09:46:35 -0000 Received: from aamtaout04-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout03-winn.ispmail.ntl.com with ESMTP id <20070818094631.ICLC13.mtaout03-winn.ispmail.ntl.com@aamtaout04-winn.ispmail.ntl.com>; Sat, 18 Aug 2007 10:46:31 +0100 Received: from pws-pc.ntlworld.com ([81.107.45.67]) by aamtaout04-winn.ispmail.ntl.com with SMTP id <20070818094631.ORBQ29112.aamtaout04-winn.ispmail.ntl.com@pws-pc.ntlworld.com>; Sat, 18 Aug 2007 10:46:31 +0100 Date: Sat, 18 Aug 2007 10:46:18 +0100 From: Peter Stephenson To: Nex Magik , zsh-workers@sunsite.dk Subject: Re: inconsistent behavior observed with export VAR=VAL versus VAR=VAL zsh 4.2.6 Message-Id: <20070818104618.1adb2896.p.w.stephenson@ntlworld.com> In-Reply-To: <200708172215.l7HMFalO004036@pws-pc.ntlworld.com> References: <432520.66027.qm@web50101.mail.re2.yahoo.com> <200708172215.l7HMFalO004036@pws-pc.ntlworld.com> X-Mailer: Sylpheed 2.3.1 (GTK+ 2.10.14; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Fri, 17 Aug 2007 23:15:36 +0100 Peter Stephenson wrote: > Nex Magik wrote: >> stimpy% Y="foo bar" >... >> stimpy% export Z=$(/bin/echo $Y):$PATH >> export: not an identifier: bar:/tmp/opt/spi/RapiDev_99a-RC1/tools/bin:/opt/gc >> c-3.2.3/bin:/opt/python-2.4.4/bin:/usr/local/bin:/bin:/usr/bin:/home/jkim/bin >> /exec/i686-Linux2:/home/jkim/bin/shell:/home/jkim/bin/shell/LOGIN/i686-Linux2 >> stimpy > > If this is what you're worried about, it's not a bug. zsh applies > completely consistent rules for arguments splitting of commands, > including "export" and it's relatives, which means if you don't want > $(...) expansions to be split into words then you must tell it not to. > The standard way is to put double quotes around the expansion. However, > if you want to change the behaviour permanently you can set the option > KSH_TYPESET. See its documentation in the zshoptions manual. Jason told me this was to do with a bash script he was trying to run in zsh, and I notice that we don't turn on KSH_TYPESET in Bourne/POSIX shell emulation, only ksh emulation. It's not obvious to me from the POSIX docs at www.opengroup.org that the bash behaviour is the approved one, but they usually get this right and it's possible I'm missing some obscure paragraph. Has anyone run across this? -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/