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'
$
An empty iteration argument list is not accepted by 'select', unless it
results from an expansion. 'for' does accept this.
On ksh93, mksh, and zsh, both 'for' and 'select' accept a literal empty
list. On shells without 'select' (dash, yash), 'for' accepts it.
So it seems to me that 'select' on bash should change to match 'for'.
Thanks,
- M.