Bash: move editor env setup to component.
Bash: use local instead of declare to create associative array inside fn.