Re: change in behavior starting with bash-4.3_p14 and $@ in [[...]]

2014-08-13 Thread Chet Ramey
On 8/13/14, 10:09 AM, Greg Wooledge wrote: > On Wed, Aug 13, 2014 at 09:47:51AM -0400, Chet Ramey wrote: >> On 8/12/14, 11:05 PM, Mike Frysinger wrote: >>> foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? > >> Word splitting is >> suppressed inside [[, so the array expands to a single word ("0 0 0"), th

Re: change in behavior starting with bash-4.3_p14 and $@ in [[...]]

2014-08-13 Thread Greg Wooledge
On Wed, Aug 13, 2014 at 09:47:51AM -0400, Chet Ramey wrote: > On 8/12/14, 11:05 PM, Mike Frysinger wrote: > > foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? > Word splitting is > suppressed inside [[, so the array expands to a single word ("0 0 0"), the > 0s are removed, leaving " " That doesn't sou

Re: change in behavior starting with bash-4.3_p14 and $@ in [[...]]

2014-08-13 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 8/12/14, 11:05 PM, Mike Frysinger wrote: > simple enough code: > foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? > > with bash-4.3_p13 and older, this would show 0. starting with bash-4.3_p14, > this now shows 1. It's intentional, and part of the sam

change in behavior starting with bash-4.3_p14 and $@ in [[...]]

2014-08-12 Thread Mike Frysinger
simple enough code: foo=(0 0 0); [[ -z ${foo[@]#0} ]]; echo $? with bash-4.3_p13 and older, this would show 0. starting with bash-4.3_p14, this now shows 1. i can't tell from the thread whether this was intentional: https://lists.gnu.org/archive/html/help-bash/2014-04/msg4.html -mike signa