This still needs unit tests, but I want to make sure the approach doesn't miss some other edge case. However, this will break scripts that have an env variable with a [ in the name, unfortunately. I'm not sure if there's a way around that.
We could enforce that env names adhere to the POSIX standard: a word consisting solely of underscores, digits, and alphabetics from the portable character set. The first character of a name is not a digit
Fixes #311
This still needs unit tests, but I want to make sure the approach doesn't miss some other edge case. However, this will break scripts that have an env variable with a [ in the name, unfortunately. I'm not sure if there's a way around that.
We could enforce that env names adhere to the POSIX standard:
a word consisting solely of underscores, digits, and alphabetics from the portable character set. The first character of a name is not a digit