From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25502 invoked from network); 11 May 2004 17:00:53 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.86) by ns1.primenet.com.au with SMTP; 11 May 2004 17:00:53 -0000 Received: (qmail 32640 invoked from network); 11 May 2004 17:00:04 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 11 May 2004 17:00:04 -0000 Received: (qmail 28265 invoked by alias); 11 May 2004 16:59:54 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7442 Received: (qmail 28256 invoked from network); 11 May 2004 16:59:54 -0000 Received: from thor.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.86) by sunsite.dk with SMTP; 11 May 2004 16:59:51 -0000 Received: (qmail 31764 invoked from network); 11 May 2004 16:59:51 -0000 Received: from rwcrmhc12.comcast.net (216.148.227.85) by a.mx.sunsite.dk with SMTP; 11 May 2004 16:59:48 -0000 Received: from [10.0.1.3] (pcp01847643pcs.southk01.tn.comcast.net[68.47.245.210]) by comcast.net (rwcrmhc12) with SMTP id <2004051116592001400jsbise>; Tue, 11 May 2004 16:59:21 +0000 In-Reply-To: References: Mime-Version: 1.0 (Apple Message framework v613) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <8AFD8741-A36C-11D8-B3B9-000A95B34D8E@blasted-heath.com> Content-Transfer-Encoding: 7bit Cc: zsh-users@sunsite.dk From: Chris Jepeway Subject: Re: ksh Emulation Not Clearing Envariables Date: Tue, 11 May 2004 12:59:19 -0400 To: Bart Schaefer X-Mailer: Apple Mail (2.613) X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: * X-Spam-Status: No, hits=1.5 required=6.0 tests=RCVD_IN_SORBS autolearn=no version=2.63 X-Spam-Hits: 1.5 > >> I'd expect the output to be >> >> X=one >> >> Instead, I see >> >> X=one >> X=one >> >> Without ksh emulation enabled, I see the expected output. >> >> This is a bug, right? > > It's the intended behavior. Whether the intention is wrong, I'm not > sure. Odd. POSIX wants the envariable to persist across invocations of the function "e"? That seems...counter-intuitive. I thought the whole point of VAR=val cmd was as a shortcut to export VAR=val ; cmd ; unset VAR nevermind dovetailing with execve()'s env pointer. Sure, in this case, cmd is a shell function, but...well...so what? Eeesh. POSIX. But, anyways, the command is "emulate ksh" not "emulate posix". Any chance this behavior could change to follow ksh? ksh88 as distributed w/ Solaris-8 is what I'm using for comparison. >> Me > Bart Chris . (Oh, hey, could folk cc me on replies? I'm not yet on the list.)