That's also what mapfile and read -a do.

On Tue, May 17, 2016 at 12:28 PM, Grisha Levit <grishale...@gmail.com>
wrote:

>
> On Tue, May 17, 2016 at 11:56 AM, Chet Ramey <chet.ra...@case.edu> wrote:
>
>> Should the coproc code remove the
>> nameref attribute and use the name supplied to the coproc command as the
>> name of the array, or should it resolve the nameref and use `x' as the
>> name of the coproc?
>>
>
> I think the latter makes sense since that is what usually happens with
> assignments to namerefs pointing to unset variables.
>
> i.e.:
>
> declare -n ref=x
> ref=(63 64)
>
> producing the same result as
>
> declare -n ref=x
> coproc ref { :; }
>
> seems reasonable.
>

Reply via email to