Re: sourcing script file from inside a function doesn't work anymore

2014-05-12 Thread thioroup8
Hi all, Chet, I compiled a 4.3.11 from scratch. Then I applied your fix and compiled again. I executed my test program I attached in my bug report and it works like a charm and like bash 4.2. Now I'm going to try with several scripts I wrote which were affected by this bug... Thank you all

Re: sourcing script file from inside a function doesn't work anymore

2014-05-12 Thread Chet Ramey
On 5/12/14, 9:33 AM, Geir Hauge wrote: > 2014-05-12 14:11 GMT+02:00 Greg Wooledge : > >> On Sat, May 10, 2014 at 12:22:40PM +0200, thioroup8 wrote: >>> Now, I source it from inside a function: I obtain following error >> message: >>> bash: declare: tmp: not found >>> I think this problem raises in

Re: sourcing script file from inside a function doesn't work anymore

2014-05-12 Thread Greg Wooledge
On Mon, May 12, 2014 at 03:33:34PM +0200, Geir Hauge wrote: > Oddly, the quotes seem to matter; changing array='(x)' to array=(x) > makes it work... > > $ f() { source <(printf "declare -a array=(x); declare -p array\n"); }; f > declare -a array='([0]="x")' OK, this also happens on my system. In

Re: sourcing script file from inside a function doesn't work anymore

2014-05-12 Thread Geir Hauge
2014-05-12 14:11 GMT+02:00 Greg Wooledge : > On Sat, May 10, 2014 at 12:22:40PM +0200, thioroup8 wrote: > > Now, I source it from inside a function: I obtain following error > message: > > bash: declare: tmp: not found > > I think this problem raises in the particular case of involving array > > v

Re: sourcing script file from inside a function doesn't work anymore

2014-05-12 Thread Greg Wooledge
On Sat, May 10, 2014 at 12:22:40PM +0200, thioroup8 wrote: > Now, I source it from inside a function: I obtain following error message: > bash: declare: tmp: not found > I think this problem raises in the particular case of involving array > variables definitions inside sourced bash script file...

sourcing script file from inside a function doesn't work anymore

2014-05-10 Thread thioroup8
Configuration Information [Automatically generated, do not change]: Machine: x86_64 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='x86_64' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='x86_64-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/locale' -DPACK