Re: declare -p doesn't show the global attribute

2015-04-29 Thread Chet Ramey
On 4/27/15 2:26 AM, isabella parakiss wrote: > On 4/27/15, Chet Ramey wrote: >> On 4/26/15 5:26 PM, isabella parakiss wrote: >>> $ fn () { declare -g var=x; declare -p var; } ; fn >>> declare -- var="x" >>> >>> I think the correct output should be declare -g var="x" >>> Is this intended or is it a

Re: declare -p doesn't show the global attribute

2015-04-26 Thread isabella parakiss
On 4/27/15, Chet Ramey wrote: > On 4/26/15 5:26 PM, isabella parakiss wrote: >> $ fn () { declare -g var=x; declare -p var; } ; fn >> declare -- var="x" >> >> I think the correct output should be declare -g var="x" >> Is this intended or is it a bug? > > There is no such thing as `the global attri

Re: declare -p doesn't show the global attribute

2015-04-26 Thread Chet Ramey
On 4/26/15 5:26 PM, isabella parakiss wrote: > $ fn () { declare -g var=x; declare -p var; } ; fn > declare -- var="x" > > I think the correct output should be declare -g var="x" > Is this intended or is it a bug? There is no such thing as `the global attribute'. The -g option simply causes decl