Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: List of unresolved issues
- X-seq: zsh-workers 10728
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: List of unresolved issues
- Date: Thu, 13 Apr 2000 09:56:43 +0100
- In-reply-to: "Your message of Wed, 12 Apr 2000 17:26:13 PDT." <000412172613.ZM12744@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
> 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 <pws@xxxxxxxxxxxxxxxxxxxxxxxxx>
Cambridge Silicon Radio, Unit 300, Science Park, Milton Road,
Cambridge, CB4 0XL, UK Tel: +44 (0)1223 392070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author