Rename $FISH_VERSION back to the original $version.

Order is restored in the universe. Fixes #4414
This commit is contained in:
Aaron Gyes
2017-10-14 08:29:16 -07:00
parent 7be8a1707c
commit fb8ae04f80
6 changed files with 6 additions and 8 deletions

View File

@@ -860,7 +860,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */) {
wcstring(L"history"),
wcstring(L"_"),
wcstring(L"PWD"),
wcstring(L"FISH_VERSION") }) {
wcstring(L"version") }) {
env_read_only.emplace(std::move(k));
// L"SHLVL" is readonly but will be inserted below after we increment it.
};
@@ -926,7 +926,7 @@ void env_init(const struct config_paths_t *paths /* or NULL */) {
// Set up the version variable.
wcstring version = str2wcstring(get_fish_version());
env_set_one(L"FISH_VERSION", ENV_GLOBAL, version);
env_set_one(L"version", ENV_GLOBAL, version);
// Set up SHLVL variable.
const auto shlvl_var = env_get(L"SHLVL");