"help echo" forgets about "\u"

2018-12-07 Thread Egmont Koblinger
Hi,

With 4.4 as well as the 20181205 snapshot: the output of "help echo"
doesn't mention the escape characters "\u" and "\U". (They are
mentioned in the manual page.)

cheers,
egmont



[minor] for/select parsing inconsistency

2018-12-07 Thread Martijn Dekker
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.




Re: "help echo" forgets about "\u"

2018-12-07 Thread Chet Ramey
On 12/7/18 5:27 AM, Egmont Koblinger wrote:
> Hi,
> 
> With 4.4 as well as the 20181205 snapshot: the output of "help echo"
> doesn't mention the escape characters "\u" and "\U". (They are
> mentioned in the manual page.)

Thanks, I'll add something.

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