This might have the same fix. I guess Bash only checks for valid
variable names during expansion or initial assignment.
$ bash -xc 'typeset -n x; x=@ x=(ha ha); typeset -p @'
+ typeset -n x
+ x=@
+ x=(ha ha)
+ typeset -p @
declare -a @='([0]="ha" [1]="ha")'
Bash eventuall
On 5/7/14, 2:10 AM, Dan Douglas wrote:
> On Monday, May 05, 2014 11:18:50 AM Chet Ramey wrote:
>> The idea behind the bash-4.3 behavior is that the placeholder local
>> variable isn't set, and doesn't really exist. It doesn't shadow a
>> global variable with the same name until it gets a value. T
On 5/7/14, 6:45 AM, Dan Douglas wrote:
> This might have the same fix. I guess Bash only checks for valid
> variable names during expansion or initial assignment.
Thanks, I already fixed this.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita
Another one to do with namerefs. :-)
Looks like it's when the target of the ref is local to the same scope.
$ gdb -q -ex 'run -c "function f { typeset x; typeset -n x; x=y; }; f"' ./bash
Reading symbols from ./bash...done.
Starting program: /home/smorg/doc/programs/bash/bash -c "function f { type
On 5/7/14, 10:21 AM, Dan Douglas wrote:
> Another one to do with namerefs. :-)
>
> Looks like it's when the target of the ref is local to the same scope.
>
> $ gdb -q -ex 'run -c "function f { typeset x; typeset -n x; x=y; }; f"' ./bash
Thanks for the report. This is an abstraction layer violat
On Wednesday, May 07, 2014 10:04:11 AM Chet Ramey wrote:
> On 5/7/14, 2:10 AM, Dan Douglas wrote:
> > By "doesn't shadow" you mean that it _does_ hide the global right?
> > Localizing
> > a variable should cover up globals and variables in parent scopes even if
> > they
> > aren't given a value.
On Wednesday, May 07, 2014 10:58:42 AM Chet Ramey wrote:
> On 5/7/14, 10:21 AM, Dan Douglas wrote:
> > Another one to do with namerefs. :-)
> >
> > Looks like it's when the target of the ref is local to the same scope.
> >
> > $ gdb -q -ex 'run -c "function f { typeset x; typeset -n x; x=y; }; f"
On 5/7/14, 11:43 AM, Dan Douglas wrote:
> On Wednesday, May 07, 2014 10:04:11 AM Chet Ramey wrote:
>> On 5/7/14, 2:10 AM, Dan Douglas wrote:
>>> By "doesn't shadow" you mean that it _does_ hide the global right?
>>> Localizing
>>> a variable should cover up globals and variables in parent scopes e