mirror of
https://github.com/nushell/nushell.git
synced 2024-12-26 08:59:12 +01:00
fcb8e36caa
# Description Before this change `default` would dive into lists and replace `null` elements with the default value. Therefore there was no easy way to process `null|list<null|string>` input and receive `list<null|string>` (IOW to apply the default on the top level only). However it's trivially easy to apply default values to list elements with the `each` command: ```nushell [null, "a", null] | each { default "b" } ``` So there's no need to have this behavior in `default` command. # User-Facing Changes * `default` no longer dives into lists to replace `null` elements with the default value. # Tests + Formatting Added a couple of tests for the new (and old) behavior. # After Submitting * Update docs. |
||
---|---|---|
.. | ||
commands | ||
format_conversions | ||
main.rs |