mirror of
https://github.com/nushell/nushell
synced 2024-12-26 04:53:09 +00:00
1c18e37a7c
# 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. |
||
---|---|---|
.. | ||
assets/nu_json | ||
const_ | ||
eval | ||
fixtures | ||
hooks | ||
modules | ||
overlays | ||
parsing | ||
path | ||
plugin_persistence | ||
plugins | ||
repl | ||
scope | ||
shell | ||
main.rs |