Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: why not promote the plague ? (brace|rc|alternative|modern) syntax
- X-seq: zsh-users 30154
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Marc Chantreux <mc@xxxxxxxxxx>, Zsh Users <zsh-users@xxxxxxx>
- Cc: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: why not promote the plague ? (brace|rc|alternative|modern) syntax
- Date: Fri, 13 Dec 2024 20:50:48 +0100
- Archived-at: <https://zsh.org/users/30154>
- In-reply-to: <Z1xLT543bNQso2vE@prometheus>
- List-id: <zsh-users.zsh.org>
- References: <8e1cd80d-fcee-4227-93ae-de2339d066fa@eastlink.ca> <5b4a5f55-717e-4794-93d7-bfd03a955ba8@app.fastmail.com> <CAA=-s3z=C2YLSMiz1cYyuCNo1pxuESZ6qvP4EQyQFT60n3+itA@mail.gmail.com> <26784dbc-3f8b-48d0-abab-193e6ec138ea@app.fastmail.com> <CAH+w=7YKdGJeBzQnYKjkdi5EFSSu=dp2fyLT4wJnk7=XTA0LbQ@mail.gmail.com> <Z1nfDWyISrBhsfXO@prometheus> <CAH+w=7Zm2Uo+Twr_iaCRPMt5xRGdfkF_HMOOP2VVoiNoLb53MA@mail.gmail.com> <Z1xLT543bNQso2vE@prometheus>
On Fri, Dec 13, 2024 at 3:58 PM Marc Chantreux <mc@xxxxxxxxxx> 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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author