nushell/crates/nu-command/src/help
Devyn Cairns f65bc97a54
Update config directly at assignment (#13332)
# Description

Allows `Stack` to have a modified local `Config`, which is updated
immediately when `$env.config` is assigned to. This means that even
within a script, commands that come after `$env.config` changes will
always see those changes in `Stack::get_config()`.

Also fixed a lot of cases where `engine_state.get_config()` was used
even when `Stack` was available.

Closes #13324.

# User-Facing Changes
- Config changes apply immediately after the assignment is executed,
rather than whenever config is read by a command that needs it.
- Potentially slower performance when executing a lot of lines that
change `$env.config` one after another. Recommended to get `$env.config`
into a `mut` variable first and do modifications, then assign it back.
- Much faster performance when executing a script that made
modifications to `$env.config`, as the changes are only parsed once.

# Tests + Formatting
All passing.

# After Submitting
- [ ] release notes
2024-07-11 06:09:33 -07:00
..
help_.rs Add Span merging functions (#12511) 2024-05-16 22:34:49 +00:00
help_aliases.rs Update config directly at assignment (#13332) 2024-07-11 06:09:33 -07:00
help_commands.rs Fix display formatting for command type in help commands (#12996) 2024-06-07 08:03:31 -05:00
help_escapes.rs ListStream touchup (#12524) 2024-05-05 16:00:59 +00:00
help_externs.rs Make get_full_help take &dyn Command (#12903) 2024-05-19 19:56:33 +02:00
help_modules.rs Update config directly at assignment (#13332) 2024-07-11 06:09:33 -07:00
help_operators.rs help operators refactor (#13307) 2024-07-06 13:09:12 -05:00
mod.rs Add 'help escapes' command for quick reference of nushell string escapes (#10522) 2023-09-30 09:04:27 -05:00