default
for filters> default {flags} (default value) (column name)
default value
: the value to use as a defaultcolumn name
: the name of the columninput | output |
---|---|
any | any |
Give a default 'target' column to all file entries
>ls-la|default'nothing'target
Get the env value of MY_ENV
with a default value 'abc' if not present
>$env|get-iMY_ENV|default'abc'
Replace the null
value in a list
> [1, 2, null, 4] |default3
╭───┬───╮
│0│1│
│1│2│
│2│3│
│3│4│
╰───┴───╯
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/default.html