nushell/crates/nu_plugin_query/src
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
..
nu Allow plugins to receive configuration from the nushell configuration (#10955) 2024-01-15 16:59:47 +08:00
lib.rs query command with json, web, xml (#870) 2022-02-01 12:45:48 -06:00
main.rs Bump to 0.60 (#4892) 2022-03-23 07:32:03 +13:00
query.rs Add themes to help command when available #10318 (#10623) 2023-10-10 07:40:05 -05:00
query_json.rs Move Value to helpers, separate span call (#10121) 2023-09-03 07:27:29 -07:00
query_web.rs Plugin explicit flags (#11581) 2024-01-22 15:00:43 -06:00
query_xml.rs Convert more examples and tests to record! macro (#10840) 2023-10-28 14:52:31 +02:00
web_tables.rs revert: move to ahash (#9464) 2023-06-18 15:27:57 +12:00