1
0
mirror of https://github.com/nushell/nushell.git synced 2025-03-27 08:07:25 +01:00
nushell/crates/nu-command/src/network
Devyn Cairns f65bc97a54
Update config directly at assignment ()
# 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 .

# 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
..
http Add and use new Signals struct () 2024-07-07 22:29:01 +00:00
url Update config directly at assignment () 2024-07-11 06:09:33 -07:00
mod.rs fetch -> http get and post -> http post () 2023-01-20 10:38:30 -08:00
port.rs Add command_prelude module () 2024-03-26 21:17:30 +00:00