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

Re: ksh Emulation Not Clearing Envariables




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 <jepeway@xxxxxxxxxxxxxxxxx>.
(Oh, hey, could folk cc me on replies?  I'm not yet on the list.)



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