bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [minor] for/select parsing inconsistency


From: Chet Ramey
Subject: Re: [minor] for/select parsing inconsistency
Date: Sun, 9 Dec 2018 11:16:52 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:52.0) Gecko/20100101 Thunderbird/52.9.1

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/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]