nushell/tests/plugins
Artemiy 092d496ff5
Plugin explicit flags (#11581)
# Description
#11492 fixed flags for builtin commands but I missed that plugins don't
use the same `has_flag` that builtins do. This PR addresses this.

Unfortunately this means that return value of `has_flag` needs to change
from `bool` to `Result<bool, ShellError>` to produce an error when
explicit value is not a boolean (just like in case of `has_flag` for
builtin commands. It is not possible to check this in
`EvaluatedCall::try_from_call` because

# User-Facing Changes
Passing explicit values to flags of plugin commands (like `--flag=true`
`--flag=false`) should work now.
BREAKING: changed return value of `EvaluatedCall::has_flag` method from
`bool` to `Result<bool, ShellError>`

# Tests + Formatting
Added tests and updated documentation and examples
2024-01-22 15:00:43 -06:00
..
formats Correct line folding in from ics/from vcf (#10577) 2023-10-03 19:11:16 +02:00
config.rs Allow plugins to receive configuration from the nushell configuration (#10955) 2024-01-15 16:59:47 +08:00
core_inc.rs Plugin explicit flags (#11581) 2024-01-22 15:00:43 -06:00
custom_values.rs Use pretty_assertions in the root crate (#8818) 2023-04-08 11:52:37 -07:00
mod.rs Allow plugins to receive configuration from the nushell configuration (#10955) 2024-01-15 16:59:47 +08:00
register.rs Show plugin extra usage and search terms (#10952) 2023-11-04 15:12:58 -05:00