Re: declare -g var should return a nonzero return code when it fails

2013-11-05 Thread Chet Ramey
On 11/4/13 4:24 AM, Peggy Russell wrote: >>> "declare -g var" should return a nonzero return code when it fails. > >> There is a problem here, and the problem that causes the spurious error >> message from test_error has been fixed in bash-4.3. However, I don't think >> you completely understand

Re: declare -g var should return a nonzero return code when it fails

2013-11-04 Thread Peggy Russell
> > "declare -g var" should return a nonzero return code when it fails. > There is a problem here, and the problem that causes the spurious error > message from test_error has been fixed in bash-4.3. However, I don't think > you completely understand what bash scoping is, or what makes a variable

Re: declare -g var should return a nonzero return code when it fails

2013-11-02 Thread Chet Ramey
On 11/1/13, 12:37 AM, Peggy Russell wrote: > Hi, > > "declare -g var" should return a nonzero return code when it fails. > > Declaring a local variable as global in a function, has a exit status of 0, > but the operation was not successful (see test_error). "help declare" and > the bash man pag