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

Re: ksh Emulation Not Clearing Envariables



Bart Schaefer wrote:
> 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.

I vaguely remember the argument years ago...

bash and ksh 88 both remove the environment variable, so probably we
ought to do the same.  It would be odd for zsh to insist on niceties
when the shells based more firmly on POSIX don't.

Solaris8 sh doesn't actually bother to set X at all when the command is a
function.  Strange.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR Ltd., Science Park, Milton Road,
Cambridge, CB4 0WH, UK                          Tel: +44 (0)1223 692070


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

This footnote also confirms that this email message has been swept by
MIMEsweeper for the presence of computer viruses.

www.mimesweeper.com
**********************************************************************



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