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: Manpage tweaks to clarify nameref behavior

2014-05-12 Thread Chet Ramey
On 5/10/14, 3:47 PM, Jeffrey S. Haemer wrote: > Fix: > > - Under PARAMETERS, change this > > Whenever the nameref variable is referenced or assigned to, the > operation is actually performed on the variable specified by the > nameref variable's value. > > to this > > Whenev

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: compgen -C not working as I expected

2014-05-12 Thread Chet Ramey
On 5/10/14, 12:45 AM, Curious Costanza wrote: > Hey Chet, > > Thank you for your response. I don't suppose that you have a small example > handy which demonstrates a useful application of compgen with the -C or -F > options, do you? I guess I still have the same question as the commenter > who res

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...