const
For core.
Create a parse-time constant.
Command Type
keyword
Signature
> const {flags} (const_name) (initial_value)
Parameters
const_name: The constant name to create.initial_value: Equals sign followed by constant value.
Input/output types:
| input | output |
|---|---|
| nothing | nothing |
Examples
Create a new parse-time constant.
> const x = 10
Create a composite constant value.
> const x = { a: 10, b: 20 }
Notes
This command is a parser keyword. For details, check: https://www.nushell.sh/book/thinking_in_nu.html
Ported from nushell/nushell.github.io. Copyright (c) 2021 Nushell Project. MIT License.