bash-language-server icon indicating copy to clipboard operation
bash-language-server copied to clipboard

local variables which are defined & re-assigned in a function are shown to be accessible globally

Open ShadowCreator250 opened this issue 1 year ago • 0 comments

Code editor

VSCode v1.89.1

Platform

Win10

Version

[email protected]

What steps will reproduce the bug?

my_function() {
	local _my_var="test"
	_my_var=42
}

$<auto-completion here, e.g. Ctrl+Space>

How often does it reproduce? Is there a required condition?

No response

What is the expected behavior?

_my_var should not show up in the auto-completion dialog because it was created locally

What do you see instead?

_my_var is shown to be supposedly accessible picture proof

Additional information

expected behaviour is described e.g. here: https://stackoverflow.com/a/22527475

ShadowCreator250 avatar May 23 '24 15:05 ShadowCreator250