zsh-users
 help / color / mirror / code / Atom feed
From: "Lawrence Velázquez" <larryv@zsh.org>
To: zsh-users@zsh.org
Subject: Re: nesting issue
Date: Sun, 05 May 2024 19:26:17 -0400	[thread overview]
Message-ID: <58741215-7c41-4230-8eb5-6556bd969140@app.fastmail.com> (raw)
In-Reply-To: <086da1ef-79dd-448d-b463-01895df2866f@eastlink.ca>

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


  reply	other threads:[~2024-05-05 23:27 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-04 19:36 Ray Andrews
2024-05-05  3:20 ` Bart Schaefer
2024-05-05  5:39   ` Lawrence Velázquez
2024-05-05  5:40   ` Roman Perepelitsa
2024-05-05 13:52     ` Ray Andrews
2024-05-05 20:14       ` Lawrence Velázquez
2024-05-05 22:18         ` Ray Andrews
2024-05-05 23:26           ` Lawrence Velázquez [this message]
2024-05-06  1:51             ` Ray Andrews
2024-05-06  3:22               ` Bart Schaefer
2024-05-06 13:01                 ` Ray Andrews
2024-05-06  3:43               ` Lawrence Velázquez
2024-05-06 13:09                 ` Ray Andrews
2024-05-05 13:13   ` Ray Andrews
2024-05-05 19:44     ` Lawrence Velázquez
2024-05-05 20:14       ` Ray Andrews
2024-05-05 20:45         ` Lawrence Velázquez
2024-05-05 22:22           ` Ray Andrews

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=58741215-7c41-4230-8eb5-6556bd969140@app.fastmail.com \
    --to=larryv@zsh.org \
    --cc=zsh-users@zsh.org \
    /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).