On 2/5/21 5:15 AM, Oğuz wrote:
$ echo '
> ${a+$(|)}
bash: command substitution: line 7: syntax error near unexpected token `|'
bash: command substitution: line 7: `|)}'
bash: unexpected EOF while looking for matching `)'
>
Reproducible on devel, 5.1.4, and 5.0.17, but the latter handles it better.
Thanks for the report. It's not the parser, or a real `syntax check'; it's
the history code trying to determine which delimiter to use when adding it
to the history list.
And while testing this on devel, I came across another one:
$ echo $BASH_VERSIbash: xmalloc: stringvec.c:40: cannot allocate
15227146888 bytes (2510848 bytes allocated)
$
$ echo $BASH_VERSIOSegmentation fault (core dumped)
$
I hit tab a few times to get the segfault.
I can't reproduce this.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/