radicle-heartwood-lfs/crates
Christopher Fredén c7bff28452 cli/issue: Use clap
A rewrite of the argument parsing portions of the `rad issue` subcommand
using `clap` instead of `lexopt`.

From a user's perspective, the look-and-feel of `rad issue` does not
change much. Although, the most prominent change is to rely on
`clap`'a default error template which looks a bit different from what we
use usually (`error: ...` vs. `✗ Error: ...`).

Leaving the above restriction aside, subcommand mis-usage is
reported more verbosely.

Also configure `clap` to use colored output for errors and help pages.
In help output, headers are colored with `Magenta` to match the overall
CLI styling.

Specify a type that captures the different actions that can be take
when using the `comment` command: `Comment`, `Reply`, and `Edit`.
Move the functions that run the corresponding actions into a `comment`
module.

To preserve the "default command" behaviour being `rad issue list`,
e.g., `rad issue --solved` behaving like `rad issue list --solved`,
introduce a new type `EmptyArgs`to also parse arguments without a
subcommand. In case no subcommand was parsed, construct `Command::List`
with from `EmptyArgs`.

Co-authored-by: Matthias Beyer <mail@beyermatthias.de>
Co-authored-by: Lorenz Leutgeb <lorenz.leutgeb@radicle.xyz>
Co-authored-by: Erik Kundt <erik@zirkular.io>
Co-authored-by: Fintan Halpenny <fintan.halpenny@gmail.com>
2025-09-28 18:02:55 +02:00
..
radicle node: Make location of secret key configurable 2025-09-26 13:03:57 +01:00
radicle-cli cli/issue: Use clap 2025-09-28 18:02:55 +02:00
radicle-cli-test radicle-cli-test: Prepare testing with `jj` 2025-09-26 12:03:01 +01:00
radicle-cob crates: 1.4.0 release 2025-08-27 10:30:28 +01:00
radicle-crypto crypto/ssh/keystore: Explicit paths 2025-09-26 13:21:38 +02:00
radicle-dag repo: Move workspace crates into `crates` subdirectory 2025-06-09 15:09:21 +02:00
radicle-fetch radicle-fetch: Replace manual std::matches!() impl 2025-08-27 23:12:50 +02:00
radicle-node node: Make location of secret key configurable 2025-09-26 13:03:57 +01:00
radicle-protocol protocol/service: Change `Routing table updated..` from info to debug 2025-09-16 13:38:26 +01:00
radicle-remote-helper cli: Detect key mismatch 2025-09-26 00:33:59 +02:00
radicle-schemars crates: 1.4.0 release 2025-08-27 10:30:28 +01:00
radicle-signals signals: Guard most of the crate for Unix 2025-08-22 15:19:31 +01:00
radicle-ssh release: prepare crates 2025-08-12 12:13:49 +02:00
radicle-systemd node: Refactor logging initialization 2025-09-23 16:33:50 +02:00
radicle-term docs: fix doc string linking 2025-09-15 10:34:42 +01:00