Skip to content

local variables in outline: fix bug on display under function; introduce hiding in list above functions #243

@sebalis

Description

@sebalis

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.

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions