bug-bash
[Top][All Lists]
Advanced

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

Re: is it a bug


From: Chet Ramey
Subject: Re: is it a bug
Date: Tue, 17 Nov 2020 10:28:51 -0500
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.4.3

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    chet@case.edu    http://tiswww.cwru.edu/~chet/



reply via email to

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