bug-bash
[Top][All Lists]
Advanced

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

Re: coproc and existing variables


From: Grisha Levit
Subject: Re: coproc and existing variables
Date: Tue, 17 May 2016 12:31:31 -0400

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

On Tue, May 17, 2016 at 12:28 PM, Grisha Levit <address@hidden> wrote:

On Tue, May 17, 2016 at 11:56 AM, Chet Ramey <address@hidden> 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

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