Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: Zsh Guide chapter 5 (substitutions)
- X-seq: zsh-users 4163
- From: Borsenkow Andrej <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: martin.ebourne@xxxxxxxxxxxx, zsh-users@xxxxxxxxxx
- Subject: RE: Zsh Guide chapter 5 (substitutions)
- Date: Thu, 23 Aug 2001 11:30:10 +0400
- Importance: Normal
- In-reply-to: <OF29CEBB17.CA244083-ON80256AB0.005C733C@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
>
> I don't know if anyone has already pointed this out, but in the user
guide
> section 5.4.2:
>
> perl zsh
> -----------------------------------------------------------------
> %hash2 = %hash; typeset -A hash2; hash2=(${(kv)hash})
>
> Surely this should be hash2=("${(@kv)hash}") in case of empty string
> values.
>
No (at least, if running as zsh):
bor@itsrm2% foo=(a "a a" b "b b")
bor@itsrm2% print -l $foo
a a
b b
bor@itsrm2% typeset -A bar
bor@itsrm2% bar=(${(kv)foo})
bor@itsrm2% print -l $bar
a a
b b
-andrej
Messages sorted by:
Reverse Date,
Date,
Thread,
Author