Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use global variable definition into configuration.
As reported in issue #52, the automatically generated configuration exploits Bash `declare` to define variable. When `pgenv_configuration_load` does `source` the configuration file, declared variables are locally scoped as reported in the `declare` help: When used in a function, `declare' makes NAMEs local, as with the `local' command. The `-g' option suppresses this behavior. Therefore every `declare` statement has to be prefix with `-g`. Unluckily it seems that the counterpart `declare`, used to print out the variable in `pgenv_configuration_write` does not outputs the `-g` flag, probably because at that time the variable is already global. Therefore, before hitting the configuration file, I append the `-g` option to `declare` with a regexp. This `-g` works on Bash 4.4 and 5 on my Linux machines. Bumped version number. Close #52
- Loading branch information