Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #14901 > unrolled thread

Re: [minor] for/select parsing inconsistency

Started byChet Ramey <chet.ramey@case.edu>
First post2018-12-09 11:16 -0500
Last post2018-12-09 11:16 -0500
Articles 1 — 1 participant

Back to article view | Back to gnu.bash.bug

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [minor] for/select parsing inconsistency Chet Ramey <chet.ramey@case.edu> - 2018-12-09 11:16 -0500

#14901 — Re: [minor] for/select parsing inconsistency

FromChet Ramey <chet.ramey@case.edu>
Date2018-12-09 11:16 -0500
SubjectRe: [minor] for/select parsing inconsistency
Message-ID<mailman.5458.1544372225.1284.bug-bash@gnu.org>
On 12/7/18 8:02 AM, Martijn Dekker wrote:
> There is a minor inconsistency in grammatical parsing between 'for' and
> 'select' loops. Since 'select' is basically a glorified 'for', it seems to
> me that they should parse the same way.
> 
> $ bash -c 'for x in; do :; done'
> $ bash -c 'select x in; do :; done'
> bash: -c: line 0: syntax error near unexpected token `;'
> bash: -c: line 0: `select x in; do :; done'
> $ bash -c 'foo=; select x in $foo; do :; done'

Thanks for the report. I'll take a look and fix it for bash-5.0-rc1.

Chet

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

[toc] | [standalone]


Back to top | Article view | gnu.bash.bug


csiph-web