Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: for loop with variable
- X-seq: zsh-users 30660
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: for loop with variable
- Date: Tue, 12 May 2026 05:43:42 +0100
- Archived-at: <https://zsh.org/users/30660>
- In-reply-to: <CAH+w=7ZjCxb7XdgSdqh=ZVYU7FfEH_E+_nNA37s9pF2rNk-7rg@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- References: <a94bb2a4-b05c-4e22-97c7-a44ccd957e73@eastlink.ca> <CAN=4vMrPSXyPkSX+bfZ0J8tuyujj-wU5Ly6Ba9073ERNb25p3Q@mail.gmail.com> <agIanvFaYb-0FepP@chazelas.org> <CAHYJk3QBH0YtN0qPd7yfi6itMS+q=nzdEG4ZiRtMkgSMbNT2jw@mail.gmail.com> <agItNpunHGQV330I@chazelas.org> <CAH+w=7ZjCxb7XdgSdqh=ZVYU7FfEH_E+_nNA37s9pF2rNk-7rg@mail.gmail.com>
2026-05-11 13:19:32 -0700, Bart Schaefer:
> On Mon, May 11, 2026, 12:30 PM Stephane Chazelas <stephane@xxxxxxxxxxxx>
> wrote:
>
> > But braceccl is even older. Added in zsh 2.2 from 1992 AFAICT.
>
> Adopted from the "rc" shell, I think?
Seems very unlikely. rc doesn't have and couldn't have brace
expansion, braces being special characters there involved in
grouping command (not as keywords like in the Bourne shell).
Its lists work a bit in the same fashion in that:
; echo X^(a b c) Y`{seq 3}
Xa Xb Xc Y1 Y2 Y3
(which gave zsh's rcexpandparams, though zsh's $a$b doesn't
expand the same as rc's when $a and $b are two lists with more
(or less) than one element)
But character classes there wouldn't make sense.
Brace expansion is initially from csh, but even the latest tcsh
doesn't seem to have an option for them to expand to individual
characters of character classes AFAICT.
> In any case I don't think zsh (Paul)
> invented the "CCL" abbreviation.
In any case neither plan9/Unix10's rc nor Byron's public domain
clone have named options.
I'd agree it's possible CCL could have been commonly used as
abbreviation for "character class" outside of zsh at the time,
given that "bracecharclass" would not have been longer than a
few other zsh options from the time such as printexitvalue
sunkeyboardhack interactivecomments menucompletebeep.
"ccl" is used in lex for instance.
2.2's README only has:
> Modification history:
>
> 2.2.0-2.1.0:
[...]
> o setopt braceccl lets "echo {a-zA-Z}" work
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author