From: Jim <linux.tech.guy@gmail.com>
To: devs <zsh-workers@zsh.org>
Subject: Strange brace(}) behavior with multiple for loops
Date: Mon, 14 Nov 2022 11:54:24 -0600 [thread overview]
Message-ID: <CA+rB6G++kshQjMqdw--T38S1thcyhPmGHLN21beUuPjas1Fp1g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 675 bytes --]
Hi everyone,
Checked on 5.7, 5.7.1, 5.8, 5.8.1 and 5.9
I had a problem with multiple for loop termination, so I simplified it.
On the command line I entered the following anonymous function:
% ()
{
emulate -L zsh
local A B C
local -a T=(1 2 3)
for A ($T) { for B ($T) { for C ($T) { print -- $A $B $C }}}
} | less
"} } }" , "}} }" and "} }}" work
"}}}" waits with "function for> " message
Depending on how I terminate the loops(see above) the anonymous function
either
works or fails if using 3 braces(}}}) togather(no spaces).
Q: Is this a bug, or am I missing something?
Google search so far hasn't yielded anything useful.
Regards,
Jim Murphy
[-- Attachment #2: Type: text/html, Size: 1061 bytes --]
next reply other threads:[~2022-11-14 17:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-14 17:54 Jim [this message]
2022-11-14 18:08 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CA+rB6G++kshQjMqdw--T38S1thcyhPmGHLN21beUuPjas1Fp1g@mail.gmail.com \
--to=linux.tech.guy@gmail.com \
--cc=linuxtechguy@gmail.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).