On 11/17/20 7:56 AM, Greg Wooledge wrote:
On Mon, Nov 16, 2020 at 10:36:48PM -0800, L A Walsh wrote:
or (to reproduce error):
  an_alias='res=() t=""
            for ci in "${!foo[@]}"; do \

Nice detective work there.  I can confirm this in Debian's bash 5.0.3:

unicorn:~$ alias foo='a=() b=""
for i in 1; do echo hi; done'
unicorn:~$ foo
bash: syntax error near unexpected token `;'
unicorn:~$ alias bar='a=()
b=""
for i in 1; do echo hi; done'
unicorn:~$ bar
hi

Interesting. Thanks for the simple reproducer, both of you. I'll take a
look after bash-5.1 is out.

--
``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/

Reply via email to