Re: certain strings both legal and illegal as associative array keys

2015-03-10 Thread Greg Wooledge
On Mon, Mar 09, 2015 at 08:18:17PM -0500, vampyre...@gmail.com wrote: > This implies to me that escaping the quotes in the unset line would cause the > array code to see the same thing in both cases. That is, > > unset foo[\"a\'b\"] > > would mean that the pre-array code word expansions would r

Re: certain strings both legal and illegal as associative array keys

2015-03-10 Thread Chet Ramey
On 3/9/15 9:18 PM, vampyre...@gmail.com wrote: > This implies to me that escaping the quotes in the unset line would cause the > array code to see the same thing in both cases. That is, > > unset foo[\"a\'b\"] > > would mean that the pre-array code word expansions would result in foo["a'b"] >

Re: certain strings both legal and illegal as associative array keys

2015-03-10 Thread konsolebox
On Fri, Mar 6, 2015 at 7:14 AM, Chet Ramey wrote: > At some point, I may take a look at changing this, but it would not be > backwards compatible, and that is undesirable. It doesn't help you > now, either. > That behavior probably would be better left untouched. We wouldn't want another incons

Re: Unsetting all elements of an associative array

2015-03-10 Thread konsolebox
On Thu, Feb 5, 2015 at 11:02 PM, Chet Ramey wrote: > On 2/5/15 8:06 AM, isabella parakiss wrote: >> On 2/4/15, konsolebox wrote: >>> Logically that should only unset the elements of an array and not the >>> array variable >>> itself since '*' or '@' is more of a wildcard that represents the >>> i

Re: How to deal with errors in <()?

2015-03-10 Thread Chet Ramey
On 3/9/15 6:19 PM, Peng Yu wrote: >> >>> $ bash --norc >>> bash-4.3$ echo <(exit 123) >>> /dev/fd/63 >>> bash-4.3$ echo "$!" >>> 12142 >>> bash-4.3$ wait "$!" >>> bash: wait: pid 12142 is not a child of this shell >>> >>> Having the process substitution pid in $! is not very useful if >>> you can't

Re: certain strings both legal and illegal as associative array keys

2015-03-10 Thread konsolebox
On Tue, Mar 10, 2015 at 6:57 PM, konsolebox wrote: > On Fri, Mar 6, 2015 at 7:14 AM, Chet Ramey wrote: > >> At some point, I may take a look at changing this, but it would not be >> backwards compatible, and that is undesirable. It doesn't help you >> now, either. >> > That behavior probably wou