mirror of
https://github.com/nushell/nushell.git
synced 2025-05-28 14:07:08 +02:00
# Description As a bit of a follow-on to #13802 and #14249, this (pretty much a "one-line" change) really does *always* populate the `$env.config` record with the `nu-protocol::config` defaults during startup. This means that an `$env.config` record is value (with defaults) even during: * `nu -n` to suppress loading of config files * `nu -c <commandstring>` * `nu <script>` # User-Facing Changes There should be no case in which there isn't a valid `$env.config`. * Before: ```nushell nu -c "$env.config" # -> Error ``` * After: ```nushell nu -c "$env.config" # -> Default $env.config record ``` Startup time impact is negligible (17.072µs from `perf!` on my system) - Seems well worth it. # Tests + Formatting Added tests for several `-n -c` cases. - 🟢 `toolkit fmt` - 🟢 `toolkit clippy` - 🟢 `toolkit test` - 🟢 `toolkit test stdlib` # After Submitting Config chapter update still in progress.