Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: nesting issue
On Sun, May 5, 2024, at 6:18 PM, Ray Andrews wrote:
> On 2024-05-05 13:14, Lawrence Velázquez wrote:
>> I don't see this behavior.
>> ...
>> aaa,3,pard
>> aaa,3a,pard
>>
> 8 /aWorking/Zsh/Source/Wk/Boneyard 1 % var=( aaa,3*(nN) ); print -l $var
> aaa,3a,pard
> aaa,3,pard
>
> ... I don't know what to say.
Seems like differing locales (which I overlooked earlier). On
Debian 12:
% locale | grep -e LC_COLLATE -e LC_ALL
LC_COLLATE="en_US.UTF-8"
LC_ALL=
% : >aaa,3{,a},pard
% print -lr -- aaa,3*(n)
aaa,3a,pard
aaa,3,pard
% () { local LC_COLLATE=C; print -lr -- aaa,3*(n) }
aaa,3,pard
aaa,3a,pard
My earlier result was with "en_US.UTF-8" on macOS.
> 8 /aWorking/Zsh/Source/Wk/Boneyard 1 % var=( aaa,6*(nN) ); print -l $var
> aaa,6
> aaa,6, # sixth char ',' precedes sixth char 'a'
> aaa,6a
> aaa,6a,
> aaa,6a,howdy # sixth char 'a' precedes sixth char ','
> aaa,6,howdy
Can't say I understand this result, but as above:
% : >aaa,6{,a}{,\,,\,howdy}
% print -lr -- aaa,6*(n)
aaa,6
aaa,6,
aaa,6a
aaa,6a,
aaa,6a,howdy
aaa,6,howdy
% () { local LC_COLLATE=C; print -lr -- aaa,6*(n) }
aaa,6
aaa,6,
aaa,6,howdy
aaa,6a
aaa,6a,
aaa,6a,howdy
> I would have expected:
>
> aaa,6,
> aaa,6a
> aaa,6,howdy
> aaa,6a,howdy
Why?
--
vq
Messages sorted by:
Reverse Date,
Date,
Thread,
Author