radicle-heartwood-lfs/radicle-cli
Vincenzo Palazzo f91ef2963e
cli: Fix partial matching for the --seed flag
This commit addresses the inconsistent parsing of the command by fixing the
partial matching behavior for the `--seed` flag. Previously, specifying
the seed value resulted in an invalid option error, as shown in the example below:

```
➜ ~ rad sync --seed z6MksmpU5b1dS7oaqF2bHXhQi1DWy2hB7Mh9CuN7y1DN6QSz
✗ Error: rad sync: invalid option '--seed'
```

With this fix, there are no restrictions on when the seed can be specified.

In a future change, we plan to implement a custom error message when a
match case does not meet specific requirements, such as `rad --fetch --announce`,
which will return a more informative error message. However, this
enhancement is left for a derived solution.

```
➜  ~ rad sync --fetch --announce
✗ Error: rad sync: invalid option '--announce'
```

Fixes: d6cebf613f
Suggested-by: Slack Coder
Signed-off-by: Vincenzo Palazzo <vincenzopalazzodev@gmail.com>
2023-08-03 13:34:23 +02:00
..
examples cli: Fix rad-fetch readme link 2023-07-25 11:52:24 +02:00
src cli: Fix partial matching for the --seed flag 2023-08-03 13:34:23 +02:00
tests node: Include addresses in `Command::Seeds` result 2023-08-01 15:48:44 +02:00
Cargo.toml Update `radicle-surf` and `git-ref-format` 2023-07-14 16:57:55 +02:00