nushell/crates/nu-engine/src
Maria José Solano d9a00a876b
Change type of flag defaults to Option<Value> (#9085)
# Description
Follow-up of #8940. As @bobhy pointed out, it makes sense for the
behaviour of flags to match the one for positional arguments, where
default values are of type `Option<Value>` instead of
`Option<Expression>`.

# User-Facing Changes
The same ones from the original PR:
- Flag default values will now be parsed as constants.
- If the default value is not a constant, a parser error is displayed.

# Tests + Formatting

A [new
test](e34e2d35f4/src/tests/test_engine.rs (L338-L344))
has been added to verify the new restriction.
2023-05-03 23:09:36 +02:00
..
call_ext.rs Allow NU_LIBS_DIR and friends to be const (#8538) 2023-04-05 19:56:48 +03:00
column.rs Bump tabled dependency to 0.11 (#8922) 2023-04-26 13:56:10 -05:00
documentation.rs FEATURE: print example command results in the help (#8189) 2023-02-26 21:05:11 +01:00
env.rs Allow NU_LIBS_DIR and friends to be const (#8538) 2023-04-05 19:56:48 +03:00
eval.rs Change type of flag defaults to Option<Value> (#9085) 2023-05-03 23:09:36 +02:00
glob_from.rs Ls symlink fix (#8276) 2023-03-20 11:04:47 -05:00
lib.rs LazyRecord (#7619) 2023-01-18 19:27:26 -08:00
nu_variable.rs Change NU_LIB_DIRS not to depend on $nu.config-path (#8887) 2023-04-14 23:16:00 +03:00
scope.rs allow custom commands to show up in $nu.scope.commands better (#8910) 2023-04-17 11:19:37 -05:00