Added environment variable and ~ string substitutions.