zsh-workers
 help / color / mirror / code / Atom feed
From: Oliver Kiddle <opk@u.genie.co.uk>
To: Zsh workers <zsh-workers@sunsite.auc.dk>
Subject: Re: Export, arrays, and ksh emulation
Date: Fri, 04 Feb 2000 18:20:54 +0000	[thread overview]
Message-ID: <389B1886.D11A435E@u.genie.co.uk> (raw)
In-Reply-To: <1000204171510.ZM8627@candle.brasslantern.com>

Bart Schaefer wrote:
> 
> Zsh does not export arrays.  It marks them exported, but does not actually
> put anything into the environment.
> 
> Ksh exports arrays by putting the first array element in the environment,
> the same way that $array == ${array[0]} (as in zsh with ksh_arrays set).
> 
> Should zsh export the first element of an array, either when ksh_arrays is
> set or just under ksh emulation, or in some other condition (new option)?

Well the documentation for KSH_ARRAYS says 'emulate ksh array handling
as closely as possible' and its effect is not limited to numbering
elements from zero so I'd say that zsh should export the first element
of an array when ksh_arrays is set.

Wouldn't it maybe be useful to make zsh do something when an array is
marked as exported. Exporting the whole array separated by spaces might
be more useful than the ksh functionality though it would be better if
it was exported in a way that another zsh could reconstruct it. Maybe
exporting lots of variables with square brackets aroung the index (e.g.
a[1]=...) could work.

Oliver


      reply	other threads:[~2000-02-04 18:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-02-04 17:15 Bart Schaefer
2000-02-04 18:20 ` Oliver Kiddle [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=389B1886.D11A435E@u.genie.co.uk \
    --to=opk@u.genie.co.uk \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).