Re: for loop with variable

Stephane Chazelas <[email protected]> Mon, 11 May 2026 19:10:57 +0100
Newsgroups gmane.comp.shells.zsh.user
Message-ID <[email protected]>
2026-05-11 19:11:55 +0200, Roman Perepelitsa:
[...]
> {a..c} expands to a b c. You can iterate over that.
[...]

See also {a-c} with the braceccl option enabled (predates the
{a..c} variant). Makes for shorter code in more complicated
cases such as:

$ echo foo{{a..c},{x..z}}bar
fooabar foobbar foocbar fooxbar fooybar foozbar
$ echo foo{a-cx-z}bar
fooabar foobbar foocbar fooxbar fooybar foozbar

-- 
Stephane