nushell/tests
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
..
assets/nu_json Remove old nushell/merge engine-q 2022-02-07 14:54:06 -05:00
const_ Evaluate string interpolation at parse time (#11562) 2024-01-22 09:13:48 +02:00
eval Exit early when encountering parsing errors (#10213) 2023-09-05 14:36:37 +02:00
fixtures Fix "Char index out of bounds" Error (#11526) 2024-01-11 15:24:49 -06:00
hooks Auto-expand table based on terminal width (#9934) 2023-08-08 05:47:23 -05:00
modules Evaluate string interpolation at parse time (#11562) 2024-01-22 09:13:48 +02:00
overlays Fix overlay_use_main_not_exported hanging when an external spam command exists (#11261) 2023-12-08 06:08:38 -06:00
parsing Forbid reserved variable names for function arguments (#11169) 2023-11-29 18:29:07 +01:00
path change canonicalize test use a more deeply rooted folder (#10685) 2023-10-11 11:27:25 -05:00
plugins Plugin explicit flags (#11581) 2024-01-22 15:00:43 -06:00
scope Add a few more fields to scope commands (#10045) 2023-08-18 20:47:38 +03:00
shell Refactor tests (using cococo instead of ^echo) (#11479) 2024-01-05 11:40:56 +08:00
main.rs prevent redefining fields in a record (#8705) 2023-04-02 06:09:33 +12:00