Re: for loop with variable
Stephane Chazelas <[email protected]> Tue, 12 May 2026 05:43:42 +0100
| Newsgroups | gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user |
|---|---|
| Message-ID | <[email protected]> |
2026-05-11 13:19:32 -0700, Bart Schaefer: > On Mon, May 11, 2026, 12:30 PM Stephane Chazelas <[email protected]> > 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