You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, there seems to be an inconsistency in the way local variables are handled in the outline window, here is an example:
#!/bin/bash
f_a() {
local v_a
v_a="_"
echo $v_a
}
f_b() {
local v_b=""
v_b="."
}
v_global=1
v_exported=2
export v_exported
If this file is opened in Eclipse with Bash Editor, the Outline window shows all variables first, and function_b has an expandable sublist containing var_b. But function_a does not have a corresponding sublist. That seems like a bug to me, unless I’ve overlooked something?
I also have a request: It should be possible to make the list of above the list of functions show only global variables – if not by default, then through an option. Maybe different icons could also be used to distinguish local from global variables. And I wonder if exported variables should be treated differently again, although I realise that variables can have a “double life” starting out as local or global variables and then being exported later.
Thank you for your work.
The text was updated successfully, but these errors were encountered:
(I also realise that a local variable can start out as non-local, but that is not the reason for Bash Editor to treat it differently. If I change function_b to
f_b() {
v_b="-"
local v_b=""
v_b="."
}
then v_b changes from being global to local; callers to f_b will see v_b set to the first value ("-") after f_b is run. But Bash Editor still shows v_b in the sublist of f_b as if it were a “true” local.)
Hi, there seems to be an inconsistency in the way local variables are handled in the outline window, here is an example:
If this file is opened in Eclipse with Bash Editor, the Outline window shows all variables first, and function_b has an expandable sublist containing var_b. But function_a does not have a corresponding sublist. That seems like a bug to me, unless I’ve overlooked something?
I also have a request: It should be possible to make the list of above the list of functions show only global variables – if not by default, then through an option. Maybe different icons could also be used to distinguish local from global variables. And I wonder if exported variables should be treated differently again, although I realise that variables can have a “double life” starting out as local or global variables and then being exported later.
Thank you for your work.
The text was updated successfully, but these errors were encountered: