Re: Unexpected result of array assignment

2019-07-18 Thread Léa Gris
On 18/07/2019 14:12, Greg Wooledge wrote: On Thu, Jul 18, 2019 at 10:58:52AM +0200, Henning wrote: eval 'foo=(["key"]="'"${foo["key"]}"' value2")' If you just want to work around the bug, why not do it in the simplest way possible? foo["key"]+=" value2" Of co

Re: bash doesn't compile when configured with --disable-bang-history

2019-07-18 Thread Chet Ramey
On 7/17/19 3:03 PM, Ken Partridge wrote: > Bash Version: 5.0 > Patch Level: 0 > Release Status: release > > Description: > It is not possible to selectively disable the history expansion with >--disable-bang-history > > Repeat-By: > ./configure --disable-bang-history > make > > > Fix

Re: Unexpected result of array assignment

2019-07-18 Thread Henning
On 18/07/2019 14:12, Greg Wooledge wrote: On Thu, Jul 18, 2019 at 10:58:52AM +0200, Henning wrote: eval 'foo=(["key"]="'"${foo["key"]}"' value2")' If you just want to work around the bug, why not do it in the simplest way possible? foo["key"]+=" value2" Of course, you are right. H

Re: Unexpected result of array assignment

2019-07-18 Thread Henning
On 18/07/2019 11:19, Andreas Schwab wrote: On Jul 18 2019, Henning wrote: eval 'foo=(["key"]="'"${foo["key"]}"' value2")' This will break if ${foo["key"]} contains any of $ ` " \ . Correct. I'd only taken blanks into account. Henning

Re: Unexpected result of array assignment

2019-07-18 Thread Greg Wooledge
On Thu, Jul 18, 2019 at 10:58:52AM +0200, Henning wrote: > On 18/07/2019 03:16, Darren 'Tadgy' Austin wrote: > > > foo=(["key"]="${foo["key"]} value2") > > using eval shoud also succeed, even for older bash: > > eval 'foo=(["key"]="'"${foo["key"]}"' value2")' If you just want to

Re: Unexpected result of array assignment

2019-07-18 Thread Andreas Schwab
On Jul 18 2019, Henning wrote: > On 18/07/2019 03:16, Darren 'Tadgy' Austin wrote: > >> foo=(["key"]="${foo["key"]} value2") > > using eval shoud also succeed, even for older bash: > > eval 'foo=(["key"]="'"${foo["key"]}"' value2")' This will break if ${foo["key"]} contains any of

Re: Unexpected result of array assignment

2019-07-18 Thread Henning
On 18/07/2019 03:16, Darren 'Tadgy' Austin wrote: foo=(["key"]="${foo["key"]} value2") using eval shoud also succeed, even for older bash: eval 'foo=(["key"]="'"${foo["key"]}"' value2")' Henning

Re: Unexpected result of array assignment

2019-07-18 Thread Darren 'Tadgy' Austin
Hi, Thanks for the quick reply. :) [I tried to cc b...@tlinx.org on this email, but get a SERVFAIL from both DNS servers, so couldn't copy you in directly, sorry!] On Wed, 17 Jul 2019, L A Walsh wrote: > In bash4.4.12, Using: > I think you need to tell bask that you are updating 'foo' > instea