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


Groups > gnu.bash.bug > #14901

Re: [minor] for/select parsing inconsistency

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: [minor] for/select parsing inconsistency
Date 2018-12-09 11:16 -0500
Organization ITS, Case Western Reserve University
Message-ID <mailman.5458.1544372225.1284.bug-bash@gnu.org> (permalink)
References <23fa7751-26d5-fe5b-32ca-84866bc27150@inlv.org>

Show all headers | View raw


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/

Back to gnu.bash.bug | Previous | Next | Find similar | Unroll thread


Thread

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

csiph-web