Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Possible parsing bug with alternate for-loop syntax
- X-seq: zsh-workers 38659
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Possible parsing bug with alternate for-loop syntax
- Date: Sat, 11 Jun 2016 17:48:48 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=KkGwnG6ztRRdj4PnZISS+y9P4yO192cC7XEPofF/7D8=; b=FyNDh3kyXjVqPkr8GCF0+bRjHwj92YfVT3HawTjIfsyBEVIpCDwUE+FQYyoLCjn361 WHSOC4DsxuONbacKMBSlR8/TTU1s16wlZK4034rqnoCrjBd+8rd0Xh1lEWlVIIfVEHmK k00eNsMWmmNEoAlTE6jMRscZOn402/q5CgjtTpRUxt7u3nq4ryAfTNaGuffn8eAgyEUf 1JCUljpoC+WiuCzzb2pytV3IuaEYWXKyys1fLcMK/9aRDJwLDYFelxBQMIsZCQd4Xqa8 icCtogMrWDfjHDuvuNqlfVHQvawHVIeD7EV+H+t9loQgVvVVFwamhgilckmYqqfZhNaa US4Q==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author