Zsh Mailing List Archive
Messages sorted by:
- X-seq: zsh-workers 13499
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: 4.0.1-pre-1
- Date: Sun, 18 Feb 2001 01:43:17 +0000
- In-reply-to: <20010217005359.7B9C8139BA@xxxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20010217005359.7B9C8139BA@xxxxxxxxxxxxxxxxxxxxxxxx>
On Feb 17, 12:53am, Peter Stephenson wrote:
} Subject: Re: 4.0.1-pre-1
} Ignoring most of the items which are associated with long discussions
} (pah!) or the ones which may not even be bugs (pah! pah!):
We should at least record somewhere (the BUGS file?) those that really
are bugs, so that we don't forget to address them later.
} > There's the ksh incompatibility with array export, 9576.
} There's some commented-out code in there in one place already. I think we
} should make ksharrays export the first word and with noksharrays, to be
} logical, export the array joined the same way we always get an array as a
} single word (c.f. singsub()). We should make sure we don't export the
} array if it's tied to a colon-array. I don't think we should export
} associative arrays at all --- the order is undefined, so we can't guarantee
} compatibility with ksh, nor promise a particular form for the non-ksh
} exported value. Unless anyone has ideas.
The way ksh appears to treat an unsubscripted associative array reference
is to substitute the element whose hash key is "0". That is, no matter
what kind of array it is, $array == $array. The associative array
code in getstrvalue() already does this, but only when `emulate ksh' is
in effect (just ksharrays is not enough to activate it).
So one issue is whether `emulation == EMULATE_KSH' should be replaced by
`isset(KSHARRAYS)' in a number of places in params.c.
For noksharrays, I think we should just leave well enough alone and not
export the arrays at all. The only reason to export one is because you
want to import it again, and tying to a colon-array is a more reliable
way of accomplishing that. Of course there are joining/splitting issues
We could export an array as a whole bunch of variables ARRAY=... etc.,
but then some programs (older shells in particular) get all huffy because
the string to the left of the `=' is "not an identifier".
Bart Schaefer Brass Lantern Enterprises
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by: