Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: List of unresolved issues



On Apr 12,  9:55pm, Peter Stephenson wrote:
> 
> I looked at the discussion we had earlier about typeset -x in functions
> (accidentally, by going to the top of the folder and starting to reply to
> things 3000 messages ago... just as well I realised) and frankly it doesn't
> increase my enthusiasm for doing anything about it.  It's all due to the
> confusion of `typeset' and `local' in ksh.  With the documented fact that
> `export' is equivalent to `typeset -gx', zsh is even now the only shell to
> handle this in a consistent way.

Are we both talking about the same things here?

There's already been a patch that makes `typeset -x' == `typeset -gx'.

The only remaining question (I think) is whether a variable that is already
a local can be put into the environment, and if so, whether such a variable
can be automatically removed from the environment again when the scope ends.

E.g.:

	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?



Messages sorted by: Reverse Date, Date, Thread, Author