From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3425 invoked from network); 13 Apr 2000 08:57:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Apr 2000 08:57:40 -0000 Received: (qmail 24480 invoked by alias); 13 Apr 2000 08:57:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10728 Received: (qmail 24471 invoked from network); 13 Apr 2000 08:57:10 -0000 Date: Thu, 13 Apr 2000 09:56:43 +0100 From: Peter Stephenson Subject: Re: List of unresolved issues In-reply-to: "Your message of Wed, 12 Apr 2000 17:26:13 PDT." <000412172613.ZM12744@candle.brasslantern.com> To: zsh-workers@sunsite.auc.dk (Zsh hackers list) Message-id: <0FSY00C9K66ILS@la-la.cambridgesiliconradio.com> Content-transfer-encoding: 7BIT > There's already been a patch that makes `typeset -x' == `typeset -gx'. Oh, that passed me by. In that case zsh definitely isn't consistent, either. > local foo > export foo # in zsh this is a no-op; > # in ksh it creates an environment string that is > # removed from the environment at function exit > > This doesn't have anything to do with confusion of `typeset' and `local'; > it has to do with `export' NOT being confused with `typeset'. > > How does that make zsh more consistent? Because it's documented that local variables don't become exported: this is the only thing I was proposing to change, I suspect it's only a propagated limitation that's always been around. It's also documented that globals don't become visible if there's a local in the way and I am absolutely and positively *not* proposing to change that, ever: every change to the scoping rules doubles the number of bugs, and this would make them exponentiate. The only thing I could imagine which would work would be a command to blow things away at one or all levels of scoping. The only reason there is no confusion over what export does is because it now explicitly has the flags -gx. If the only proposals are to screw it up in some other way, I'll leave it to someone else to do. -- Peter Stephenson Cambridge Silicon Radio, Unit 300, Science Park, Milton Road, Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070