mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-15 17:31:16 -03:00
Factor some environment setting into set_scoped_internal
Breaks up a monolith function.
This commit is contained in:
@@ -402,13 +402,12 @@ 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 = globals.get(L"fish_features")) {
|
||||
if (auto features_var = env_stack_t::globals().get(L"fish_features")) {
|
||||
for (const wcstring &s : features_var->as_list()) {
|
||||
mutable_fish_features().set_from_string(s);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user