From: Mikael Magnusson <mikachu@gmail.com>
To: zsh workers <zsh-workers@zsh.org>
Subject: Possible parsing bug with alternate for-loop syntax
Date: Sat, 11 Jun 2016 17:48:48 +0200 [thread overview]
Message-ID: <CAHYJk3QbvQmFLb9SBXg9+swTO7WMyEcd8NjW37Qve8G-G5JAWw@mail.gmail.com> (raw)
17:44:25 <Mikachu> > for a (1) {echo hi}
17:44:26 <machabot> Mikachu: hi
17:44:29 <Mikachu> > for a (1) {a=hi}; echo $a
17:44:38 <machabot> Mikachu: Timeout (no output).
17:44:36 <Mikachu> > for a (1) {a=hi} }; echo $a
17:44:39 <machabot> Mikachu: hi}
17:45:17 <Mikachu> > for a (1) {builtin local a=hi}; echo $a
17:45:18 <machabot> Mikachu: hi
17:45:22 <Mikachu> > for a (1) {local a=hi}; echo $a
17:45:30 <machabot> Mikachu: Timeout (no output).
17:45:26 <Mikachu> nice
17:45:37 <Mikachu> you get the bug for reserved word local but not for
builtin local
The documentation does state the syntax is { list } with the space
included, but this still seemed somewhat surprising to me.
--
Mikael Magnusson
next reply other threads:[~2016-06-11 15:48 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-11 15:48 Mikael Magnusson [this message]
2016-06-11 18:31 ` Bart Schaefer
2016-06-11 19:21 ` Mikael Magnusson
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=CAHYJk3QbvQmFLb9SBXg9+swTO7WMyEcd8NjW37Qve8G-G5JAWw@mail.gmail.com \
--to=mikachu@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).