bash-language-server
bash-language-server copied to clipboard
local variables which are defined & re-assigned in a function are shown to be accessible globally
Code editor
VSCode v1.89.1
Platform
Win10
Version
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
Additional information
expected behaviour is described e.g. here: https://stackoverflow.com/a/22527475