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

Re: ksh Emulation Not Clearing Envariables



On Sat, 8 May 2004, Chris Jepeway wrote:

> 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.
I believe there was a discussion of the POSIX requirements for this at
some point in the past, and the non-zsh-emulation modes follow POSIX while
(as usual, e.g. shwordsplit) zsh-mode does what it thinks is preferable.

It's possible that ksh also does not follow POSIX and therefore zsh's ksh
emulation shouldn't do so.  Or its possible that ksh does two different
things depending on the form of the function declaration, e.g. whether

	function e { ... }
vs
	e() { ... }

and zsh is only able to emulate one or the other because it does not 
distinguish the two the way ksh does.  (There is no promise made that zsh
will be able to run ksh scripts unmodified; zsh doesn't support namerefs,
among other things.)

> If so, should I file a report @ sourceforge.net?

I keep thinking we should just disable the bug tracker at sourceforge.  I
don't think anyone pays regular attention to it any more.  Bug reports are
usually "filed" by sending them to the zsh-workers mailing list.



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