Instantize env_get

This commit is contained in:
ridiculousfish
2018-09-24 22:26:46 -04:00
parent 6f52e6bb1c
commit 3b1709180f
14 changed files with 98 additions and 85 deletions

View File

@@ -364,12 +364,13 @@ int main(int argc, char **argv) {
save_term_foreground_process_group();
}
auto &globals = env_stack_t::globals();
const struct config_paths_t paths = determine_config_directory_paths(argv[0]);
env_init(&paths);
// Set features early in case other initialization depends on them.
// Start with the ones set in the environment, then those set on the command line (so the
// command line takes precedence).
if (auto features_var = env_get(L"fish_features")) {
if (auto features_var = globals.get(L"fish_features")) {
for (const wcstring &s : features_var->as_list()) {
mutable_fish_features().set_from_string(s);
}