Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Associative Arrays
- X-seq: zsh-users 8113
- From: Stephane Chazelas <Stephane.Chazelas@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx, Nikolai Weibull <zsh-users-list@xxxxxxxxxxxxx>
- Subject: Re: Associative Arrays
- Date: Mon, 25 Oct 2004 14:14:46 +0100
- In-reply-to: <Pine.LNX.4.61.0410220803040.23496@xxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx, Nikolai Weibull <zsh-users-list@xxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20041020195348.GJ11322@xxxxxxxxxxxxxxxxxx> <20041021110526.GE1740@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <20041021123835.GF9224@xxxxxxxxxxxxxxxxxx> <Pine.LNX.4.61.0410210900110.14956@xxxxxxxxxxxxxxxxxx> <20041022123233.GF1720@xxxxxxxxxxxxxxxxxxxxxxxxxxxx> <Pine.LNX.4.61.0410220803040.23496@xxxxxxxxxxxxxxxxxx>
On Fri, Oct 22, 2004 at 08:07:13AM -0700, Bart Schaefer wrote:
[...]
> The behaviour of arguments after -A NAME or +A NAME depends on
> whether the option KSH_ARRAYS is set. If it is not set, all
> arguments following NAME are treated as values for the array,
> regardless of their form. If the option is set, normal option
> processing continues at that point; only regular arguments are
> treated as values for the array. This means that
>
> set -A array -x -- foo
>
> sets array to `-x - foo' if KSH_ARRAYS is not set, but sets the
> array to foo and turns on the option `-x' if it is set.
[...]
You're right. I was wrong.
I had tested:
set -A a -- foo
echo $a
(but not in ksh compatibility mode)
and
set -A a -e foo
echo $a
And of course, the "-e" was grabbed by echo...
Sorry for that,
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author