Re: why not promote the plague ? (brace|rc|alternative|modern) syntax

Mikael Magnusson <[email protected]>
Newsgroups gmane.comp.shells.zsh.devel,gmane.comp.shells.zsh.user
Message-ID <CAHYJk3Qsx_GPeqynnMxObaWpJhGQiiRuyn7ap++xTGtzpqtWdA@mail.gmail.com>
On Fri, Dec 13, 2024 at 3:58 PM Marc Chantreux <[email protected]> wrote:
>
> On Fri, Dec 13, 2024 at 07:13:20AM +0900, Bart Schaefer wrote:
> > I think those remarks apply mostly to script programming.  E.g., I use
> > shortloops all the time when at an interactive prompt, up until it becomes
> > complicated enough with pipelines etc. that I need to force the interpretation.
>
> I don't setopt shortloops. AFAIR it's different from alternative syntax
> (and didn't work well for me). can you confirm ?

It looks like there's some confusion in this thread about alternate syntax:
for a (foo bar baz) { echo $a }
vs short_loops syntax:
for a in foo bar baz; echo $a

But for what it's worth, short_loops is unfortunately set by default.
If you don't want to use it, I recommend sticking a setopt
noshortloops in your .zshrc to catch more typos.

-- 
Mikael Magnusson
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.