1
0
mirror of https://github.com/nushell/nushell.git synced 2025-03-12 14:38:32 +01:00
nushell/crates/nu_plugin_inc
Artemiy 092d496ff5
Plugin explicit flags ()
# Description
 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
..
src Plugin explicit flags () 2024-01-22 15:00:43 -06:00
Cargo.toml Bump to dev version 0.89.1 () 2024-01-11 00:19:21 +13:00
README.md remove the --encoding option from register in the examples () 2023-02-11 13:13:40 +00:00

Incrementor plugin for Nushell

Note: this requires Nushell 0.60 or later

To install:

cargo install --path .

To register (from inside Nushell):

register <path to installed plugin>