Path: csiph.com!goblin1!goblin.stu.neva.ru!usenet.stanford.edu!not-for-mail From: =?utf-8?Q?Lawrence_Vel=C3=A1zquez?= Newsgroups: gnu.bash.bug Subject: Re: Undocumented for-loop construct Date: Thu, 6 Aug 2020 22:42:48 -0400 Lines: 25 Approved: bug-bash@gnu.org Message-ID: References: <87364zur1p.fsf@hobgoblin.ariadne.com> NNTP-Posting-Host: lists.gnu.org Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.15\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: usenet.stanford.edu 1596768176 29326 209.51.188.17 (7 Aug 2020 02:42:56 GMT) X-Complaints-To: action@cs.stanford.edu Cc: Klaas Vantournhout , bug-bash@gnu.org To: "Dale R. Worley" Envelope-to: bug-bash@gnu.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=larryv.me; h= content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; s=fm1; bh=3 i8mNjfKqv/7W/hUhkfrsI1ol/eJmrRJeo2Ce48RZG0=; b=kVN1Vygvu+S5joo3x DydauhkrVSBrFoAHE3wU4YL9w3GnRQCDt/pMut2KRzJqc/8tEVPlc2WHRFfX1xKh VBf1pBQWlkh7AkgJDZymDiqdW/ODJpNBxFMSQdXOJRjmcTryCHZeNXCIgPWHYVtn l4UX2RHZ8l84fojZL7LRUTrawF+VI9Rdz4vouPpKol/jcL26fvbuHLcJLkYVDPbx ASMLhcXW691Q5gBSL+9kUSPwhxWLfDIDLMsG6vSgOfO/HlEw73vQlDD2QGcsEX5+ LXj5haalytWmMvGHspq0kU3XrfXMSkSs8PrQpgPK6j5sFB5j45xPCwu/5vqgQwgS eI3rw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=3i8mNjfKqv/7W/hUhkfrsI1ol/eJmrRJeo2Ce48RZ G0=; b=GebCVy0Tm9VM/dtlKiyWZ6UGHkT424Fn6H/4fmdHbovOXqfOXlnAQFTIq mFC9e7GuM0FibDZXFQ00zNNSzympsDZsASU5h/V5UiSEyks3JGBzR1KNB3B5e/Ta rKwtXqZ1+D4ARTvYySr8N54h7nJ2+7C5eoxISPpHqoegN6wY5c2TZgfvvebMjZGP 8J3VrbFIRWUYdlBhE3hOWJJGhBmz22keWu4LysEpIrhgK1ZZou3pAO6q4Rkzmj5T upKPdL/K4ATB7Gb7ooIb8LnfLw/PJ8daQKQZnEJGFvv8JNbkgTJuKzlap2RwKRZP c7ErbhP5WsgPurUQpL/HKJrGkgLOQ== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeduiedrkedugdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpegtggfuhfgjfffgkfhfvffosehtqhhmtdhhtdejnecuhfhrohhmpefnrgifrhgv nhgtvggpgggvlhojiihquhgviicuoehvqheslhgrrhhrhihvrdhmvgeqnecuggftrfgrth htvghrnhepudffieduvddvgfeghfeikeeffeeuueekleelteeukeeuveeuvdffgedtffdv ieeunecuffhomhgrihhnpehsthgrtghkohhvvghrfhhlohifrdgtohhmnecukfhppedutd dtrdduvddrudejkedrvdefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehm rghilhhfrhhomhepvhhqsehlrghrrhihvhdrmhgv X-ME-Proxy: In-Reply-To: <87364zur1p.fsf@hobgoblin.ariadne.com> X-Mailer: Apple Mail (2.3445.104.15) Received-SPF: pass client-ip=66.111.4.26; envelope-from=vq@larryv.me; helo=out2-smtp.messagingengine.com X-detected-operating-system: by eggs.gnu.org: First seen = 2020/08/06 22:42:50 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x [generic] [fuzzy] X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: bug-bash@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Bug reports for the GNU Bourne Again SHell List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Mailman-Original-Message-ID: X-Mailman-Original-References: <87364zur1p.fsf@hobgoblin.ariadne.com> Xref: csiph.com gnu.bash.bug:16730 > On Aug 6, 2020, at 10:29 PM, Dale R. Worley = wrote: >=20 > Klaas Vantournhout writes: >> Recently I came across a surprising undocumented bash-feature >>=20 >> $ for i in 1 2 3; { echo $i; }; >>=20 >> The usage of curly-braces instead of the well-documented do ... done >> construct was a complete surprise to me and even lead me to open the >> following question on stack overflow: >=20 > Interesting! Looking at parse.y, it looks like do ... done can be > replaced with { ... } in 'for' and 'select' statements, but not = 'while' > and 'until' statements. Not clear why that would be Unless I'm quite mistaken, our very own O=C4=9Fuz left the only answer on the OP's Stack Overflow question, explaining that braced forms of the other compound commands would be syntactically ambiguous. https://stackoverflow.com/a/63261064 vq=