diff --git a/CHANGELOG.md b/CHANGELOG.md index 89be98e..80b898b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,9 +15,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Make subject mandatory and optional content - by Awiteb +### Documentation + +- Update commands help messages - by Awiteb + ### Fixed - Check the nip07 signer in `CliOptions::ensure_signer` - by Awiteb +- Required the `applied_commits` - by Awiteb ## [0.4.0] - 2025-08-08 diff --git a/docs/issue/close.md b/docs/issue/close.md index 3d66379..93efeda 100644 --- a/docs/issue/close.md +++ b/docs/issue/close.md @@ -12,7 +12,7 @@ Arguments: The open issue id to close it Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Issue a kind `1632` (Close status) for the specified issue. The issue have to diff --git a/docs/issue/list.md b/docs/issue/list.md index ec5ccea..1c01730 100644 --- a/docs/issue/list.md +++ b/docs/issue/list.md @@ -9,7 +9,7 @@ List the repositories issues Usage: n34 issue list [OPTIONS] [NADDR-NIP05-OR-SET]... Arguments: - [NADDR-NIP05-OR-SET]... Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + [NADDR-NIP05-OR-SET]... Repository addresses Options: --limit Maximum number of issues to list [default: 15] diff --git a/docs/issue/new.md b/docs/issue/new.md index 59836d2..ac1ab7c 100644 --- a/docs/issue/new.md +++ b/docs/issue/new.md @@ -9,7 +9,7 @@ Create a new repository issue Usage: n34 issue new [OPTIONS] <--content |--editor> Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses -c, --content Markdown content for the issue. Cannot be used together with the `--editor` flag -e, --editor Opens the user's default editor to write issue content. The first line will be used as the issue subject --subject The issue subject. Cannot be used together with the `--editor` flag diff --git a/docs/issue/reopen.md b/docs/issue/reopen.md index 57ab35f..c2747e4 100644 --- a/docs/issue/reopen.md +++ b/docs/issue/reopen.md @@ -12,7 +12,7 @@ Arguments: The ID of the closed issue to reopen Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Issue a kind `1630` (Open status) for the specified issue. The issue have to diff --git a/docs/issue/resolve.md b/docs/issue/resolve.md index fc03d3f..3cd1045 100644 --- a/docs/issue/resolve.md +++ b/docs/issue/resolve.md @@ -12,7 +12,7 @@ Arguments: The issue id to resolve it Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Issue a kind `1631` (Resolved status) event for the specified issue. diff --git a/docs/issue/view.md b/docs/issue/view.md index d22b668..0200277 100644 --- a/docs/issue/view.md +++ b/docs/issue/view.md @@ -12,7 +12,7 @@ Arguments: The issue id to view it Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Simply provide the issue ID in `note` or `nevent` format to retrieve and display diff --git a/docs/patch/apply.md b/docs/patch/apply.md index 28f6415..d1fb7e6 100644 --- a/docs/patch/apply.md +++ b/docs/patch/apply.md @@ -13,7 +13,7 @@ Arguments: [APPLIED_COMMITS]... The applied commits Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses --patches Patches that have been applied. Use this when only some patches have been applied, not all ``` diff --git a/docs/patch/close.md b/docs/patch/close.md index c37d81d..fd0ef13 100644 --- a/docs/patch/close.md +++ b/docs/patch/close.md @@ -12,7 +12,7 @@ Arguments: The open/drafted patch id to close it. Must be orignal root patch Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Issue a kind `1632` (Close status) for the specified patch. The patch have to diff --git a/docs/patch/draft.md b/docs/patch/draft.md index bc0a987..7c1d174 100644 --- a/docs/patch/draft.md +++ b/docs/patch/draft.md @@ -12,7 +12,7 @@ Arguments: The open patch id to draft it. Must be orignal root patch Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Issue a kind `1633` (Draft status) for the specified patch. The patch have to diff --git a/docs/patch/fetch.md b/docs/patch/fetch.md index 1ef08a4..d15f019 100644 --- a/docs/patch/fetch.md +++ b/docs/patch/fetch.md @@ -12,7 +12,7 @@ Arguments: The patch id to fetch it Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses -o, --output Output directory for the patches. Default to the current directory ``` diff --git a/docs/patch/list.md b/docs/patch/list.md index 28a82ac..c745bd1 100644 --- a/docs/patch/list.md +++ b/docs/patch/list.md @@ -9,7 +9,7 @@ List the repositories patches Usage: n34 patch list [OPTIONS] [NADDR-NIP05-OR-SET]... Arguments: - [NADDR-NIP05-OR-SET]... Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + [NADDR-NIP05-OR-SET]... Repository addresses Options: --limit Maximum number of patches to list [default: 15] diff --git a/docs/patch/merge.md b/docs/patch/merge.md index 9f87c64..ec766bf 100644 --- a/docs/patch/merge.md +++ b/docs/patch/merge.md @@ -13,7 +13,7 @@ Arguments: The merge commit id Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses --patches Patches that have been merged. Use this when only some patches have been merged, not all ``` diff --git a/docs/patch/reopen.md b/docs/patch/reopen.md index b57d5b2..7e0119f 100644 --- a/docs/patch/reopen.md +++ b/docs/patch/reopen.md @@ -12,7 +12,7 @@ Arguments: The closed/drafted patch id to reopen it. Must be orignal root patch Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Issue a kind `1632` (Close status) for the specified patch. The patch have to diff --git a/docs/patch/send.md b/docs/patch/send.md index 1268d96..0526f37 100644 --- a/docs/patch/send.md +++ b/docs/patch/send.md @@ -12,7 +12,7 @@ Arguments: ... List of patch files to send (space separated) Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses --original-patch Original patch ID if this is a revision of it ``` diff --git a/docs/reply.md b/docs/reply.md index 13d0116..17dbc11 100644 --- a/docs/reply.md +++ b/docs/reply.md @@ -13,7 +13,7 @@ Arguments: Options: --quote-to Quote the replied-to event in the editor - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses -c, --comment The comment (cannot be used with --editor) -e, --editor Open editor to write comment (cannot be used with --content) ``` diff --git a/docs/repo/state.md b/docs/repo/state.md index da8732f..b0d2e8d 100644 --- a/docs/repo/state.md +++ b/docs/repo/state.md @@ -12,7 +12,7 @@ Arguments: Name of the repository's primary branch, such as 'master' or 'main' Options: - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses --tags Tags to announce a state for, in the format `=`. Separated by comma --branches Branches to announce a state for, in the format `=`. Separated by comma ``` diff --git a/docs/repo/view.md b/docs/repo/view.md index 5041a60..cb39bdd 100644 --- a/docs/repo/view.md +++ b/docs/repo/view.md @@ -9,7 +9,7 @@ View details of a nostr git repository Usage: n34 repo view [NADDR-NIP05-OR-SET]... Arguments: - [NADDR-NIP05-OR-SET]... Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + [NADDR-NIP05-OR-SET]... Repository addresses ``` This command prints repository details to standard output. If no arguments diff --git a/docs/sets/new.md b/docs/sets/new.md index e19c78e..1ebd5dc 100644 --- a/docs/sets/new.md +++ b/docs/sets/new.md @@ -13,7 +13,7 @@ Arguments: Options: --set-relay Optional relay to add it to the set, either as URL or set name to extract its relays. [aliases: `--sr`] - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Each set requires a unique name, provided as the final argument to the command. diff --git a/docs/sets/remove.md b/docs/sets/remove.md index 4d2c81f..5320dd3 100644 --- a/docs/sets/remove.md +++ b/docs/sets/remove.md @@ -13,7 +13,7 @@ Arguments: Options: --set-relay Specific relay to remove it from the set, either as URL or set name to extract its relays. [aliases: `--sr`] - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses ``` Removes an entire set, or specific repositories and relays from it. diff --git a/docs/sets/update.md b/docs/sets/update.md index 81e4d5a..08f520e 100644 --- a/docs/sets/update.md +++ b/docs/sets/update.md @@ -13,7 +13,7 @@ Arguments: Options: --set-relay Add relay to the set, either as URL or set name to extract its relays. [aliases: `--sr`] - --repo Repository address in `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel` + --repo Repository addresses --override Replace existing relays/repositories instead of adding to them ``` diff --git a/src/cli/commands/issue/close.rs b/src/cli/commands/issue/close.rs index 4392b40..27a276e 100644 --- a/src/cli/commands/issue/close.rs +++ b/src/cli/commands/issue/close.rs @@ -28,11 +28,17 @@ use crate::{ #[derive(Debug, Args)] pub struct CloseArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The open issue id to close it issue_id: NostrEvent, diff --git a/src/cli/commands/issue/list.rs b/src/cli/commands/issue/list.rs index f360e8c..0a67e2d 100644 --- a/src/cli/commands/issue/list.rs +++ b/src/cli/commands/issue/list.rs @@ -25,11 +25,13 @@ use crate::{ #[derive(Debug, Args)] pub struct ListArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET")] + #[arg(value_name = "NADDR-NIP05-OR-SET", value_delimiter = ',')] naddrs: Option>, /// Maximum number of issues to list #[arg(long, default_value = "15")] diff --git a/src/cli/commands/issue/new.rs b/src/cli/commands/issue/new.rs index 7ae61e8..09f7582 100644 --- a/src/cli/commands/issue/new.rs +++ b/src/cli/commands/issue/new.rs @@ -43,11 +43,17 @@ use crate::{ ) )] pub struct NewArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// Markdown content for the issue. Cannot be used together with the /// `--editor` flag. @@ -115,10 +121,7 @@ impl CommandRunner for NewArgs { relays, naddrs.extract_relays(), utils::add_write_relays(relays_list.as_ref()), - client - .fetch_repos(&naddrs.into_coordinates()) - .await? - .extract_relays(), + repos.extract_relays(), // Include read relays for each maintainer (if found) client.read_relays_from_users(&maintainers).await, content_details diff --git a/src/cli/commands/issue/reopen.rs b/src/cli/commands/issue/reopen.rs index 88bf40f..1db9677 100644 --- a/src/cli/commands/issue/reopen.rs +++ b/src/cli/commands/issue/reopen.rs @@ -28,11 +28,17 @@ use crate::{ #[derive(Debug, Args)] pub struct ReopenArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The closed issue id to reopen it issue_id: NostrEvent, diff --git a/src/cli/commands/issue/resolve.rs b/src/cli/commands/issue/resolve.rs index aa865a2..9d95e01 100644 --- a/src/cli/commands/issue/resolve.rs +++ b/src/cli/commands/issue/resolve.rs @@ -28,11 +28,17 @@ use crate::{ #[derive(Debug, Args)] pub struct ResolveArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The issue id to resolve it issue_id: NostrEvent, diff --git a/src/cli/commands/issue/view.rs b/src/cli/commands/issue/view.rs index 3925074..c18f915 100644 --- a/src/cli/commands/issue/view.rs +++ b/src/cli/commands/issue/view.rs @@ -33,11 +33,17 @@ use crate::{ #[derive(Debug, Args)] pub struct ViewArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The issue id to view it issue_id: NostrEvent, diff --git a/src/cli/commands/mod.rs b/src/cli/commands/mod.rs index 006834f..44445c1 100644 --- a/src/cli/commands/mod.rs +++ b/src/cli/commands/mod.rs @@ -73,8 +73,8 @@ pub struct CliOptions { #[arg(short = '7', long, group = "signer")] pub nip07: bool, /// Fallbacks relay to write and read from it. Multiple relays can be - /// passed. - #[arg(short, long)] + /// passed, separated by commas. + #[arg(short, long, value_delimiter = ',')] pub relays: Vec, /// Proof of Work difficulty when creatring events #[arg(long, value_name = "DIFFICULTY")] diff --git a/src/cli/commands/patch/apply.rs b/src/cli/commands/patch/apply.rs index dc49be1..82f51ee 100644 --- a/src/cli/commands/patch/apply.rs +++ b/src/cli/commands/patch/apply.rs @@ -29,11 +29,17 @@ use crate::{ #[derive(Debug, Args)] pub struct ApplyArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The open patch id to apply it. Must be orignal root patch or /// revision root diff --git a/src/cli/commands/patch/close.rs b/src/cli/commands/patch/close.rs index 313cea5..3582ab7 100644 --- a/src/cli/commands/patch/close.rs +++ b/src/cli/commands/patch/close.rs @@ -28,11 +28,17 @@ use crate::{ #[derive(Debug, Args)] pub struct CloseArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The open/drafted patch id to close it. Must be orignal root patch patch_id: NostrEvent, diff --git a/src/cli/commands/patch/draft.rs b/src/cli/commands/patch/draft.rs index e048bae..14ebdb5 100644 --- a/src/cli/commands/patch/draft.rs +++ b/src/cli/commands/patch/draft.rs @@ -28,11 +28,17 @@ use crate::{ #[derive(Debug, Args)] pub struct DraftArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The open patch id to draft it. Must be orignal root patch patch_id: NostrEvent, diff --git a/src/cli/commands/patch/fetch.rs b/src/cli/commands/patch/fetch.rs index 515869f..552a8ea 100644 --- a/src/cli/commands/patch/fetch.rs +++ b/src/cli/commands/patch/fetch.rs @@ -43,11 +43,17 @@ use crate::{ #[derive(Debug, Args)] pub struct FetchArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// Output directory for the patches. Default to the current directory #[arg(short, long, value_name = "PATH")] diff --git a/src/cli/commands/patch/list.rs b/src/cli/commands/patch/list.rs index 76c5b26..efccac3 100644 --- a/src/cli/commands/patch/list.rs +++ b/src/cli/commands/patch/list.rs @@ -25,11 +25,13 @@ use crate::{ #[derive(Debug, Args)] pub struct ListArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET")] + #[arg(value_name = "NADDR-NIP05-OR-SET", value_delimiter = ',')] naddrs: Option>, /// Maximum number of patches to list #[arg(long, default_value = "15")] diff --git a/src/cli/commands/patch/merge.rs b/src/cli/commands/patch/merge.rs index 8b5c846..d8efc6c 100644 --- a/src/cli/commands/patch/merge.rs +++ b/src/cli/commands/patch/merge.rs @@ -29,11 +29,17 @@ use crate::{ #[derive(Debug, Args)] pub struct MergeArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The open patch id to merge it. Must be orignal root patch or /// revision root diff --git a/src/cli/commands/patch/reopen.rs b/src/cli/commands/patch/reopen.rs index 1fa6337..8ef32a4 100644 --- a/src/cli/commands/patch/reopen.rs +++ b/src/cli/commands/patch/reopen.rs @@ -28,11 +28,17 @@ use crate::{ #[derive(Debug, Args)] pub struct ReopenArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The closed/drafted patch id to reopen it. Must be orignal root patch patch_id: NostrEvent, diff --git a/src/cli/commands/patch/send.rs b/src/cli/commands/patch/send.rs index 173680f..88cc00a 100644 --- a/src/cli/commands/patch/send.rs +++ b/src/cli/commands/patch/send.rs @@ -47,11 +47,17 @@ const PATCH_ALT_PREFIX: &str = "git patch: "; #[derive(Args, Debug)] pub struct SendArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// List of patch files to send (space separated). /// diff --git a/src/cli/commands/reply.rs b/src/cli/commands/reply.rs index b837ff9..6f123de 100644 --- a/src/cli/commands/reply.rs +++ b/src/cli/commands/reply.rs @@ -62,11 +62,17 @@ pub struct ReplyArgs { /// Quote the replied-to event in the editor #[arg(long)] quote_to: bool, - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// The comment (cannot be used with --editor) #[arg(short, long)] diff --git a/src/cli/commands/repo/state.rs b/src/cli/commands/repo/state.rs index 64d5922..b3f81ca 100644 --- a/src/cli/commands/repo/state.rs +++ b/src/cli/commands/repo/state.rs @@ -48,11 +48,17 @@ const HEAD_TAG_KIND: TagKind = TagKind::Custom(Cow::Borrowed("HEAD")); /// Arguments for the `repo state` command #[derive(Args, Debug)] pub struct StateArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Option>, /// Tags to announce a state for, in the format `=`. /// Separated by comma. diff --git a/src/cli/commands/repo/view.rs b/src/cli/commands/repo/view.rs index db753ed..886c004 100644 --- a/src/cli/commands/repo/view.rs +++ b/src/cli/commands/repo/view.rs @@ -33,11 +33,13 @@ use crate::{ /// Arguments for the `repo view` command #[derive(Args, Debug)] pub struct ViewArgs { - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. /// /// If omitted, looks for a `nostr-address` file. - #[arg(value_name = "NADDR-NIP05-OR-SET")] + #[arg(value_name = "NADDR-NIP05-OR-SET", value_delimiter = ',')] naddrs: Option>, } diff --git a/src/cli/commands/sets/new.rs b/src/cli/commands/sets/new.rs index 2f6c2f3..84821ea 100644 --- a/src/cli/commands/sets/new.rs +++ b/src/cli/commands/sets/new.rs @@ -31,12 +31,18 @@ pub struct NewArgs { /// Unique name for the set name: String, /// Optional relay to add it to the set, either as URL or set name to - /// extract its relays. [aliases: `--sr`] - #[arg(long = "set-relay", alias("sr"))] + /// extract its relays, separated by commas. [aliases: `--sr`] + #[arg(long = "set-relay", alias("sr"), value_delimiter = ',')] relays: Vec, - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Vec, } diff --git a/src/cli/commands/sets/remove.rs b/src/cli/commands/sets/remove.rs index 40147b5..3460c05 100644 --- a/src/cli/commands/sets/remove.rs +++ b/src/cli/commands/sets/remove.rs @@ -30,13 +30,19 @@ pub struct RemoveArgs { /// Set name to delete name: String, /// Specific relay to remove it from the set, either as URL or set name to - /// extract its relays. [aliases: `--sr`] - #[arg(long = "set-relay", alias("sr"))] + /// extract its relays, separated by commas. [aliases: `--sr`] + #[arg(long = "set-relay", alias("sr"), value_delimiter = ',')] relays: Vec, - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Vec, } diff --git a/src/cli/commands/sets/update.rs b/src/cli/commands/sets/update.rs index 7307fe2..d71bcba 100644 --- a/src/cli/commands/sets/update.rs +++ b/src/cli/commands/sets/update.rs @@ -31,13 +31,19 @@ use crate::{ pub struct UpdateArgs { /// Name of the set to update name: String, - /// Add relay to the set, either as URL or set name to extract its relays. - /// [aliases: `--sr`] - #[arg(long = "set-relay", alias("sr"))] + /// Add relay to the set, either as URL or set name to extract its relays, + /// separated by commas. [aliases: `--sr`] + #[arg(long = "set-relay", alias("sr"), value_delimiter = ',')] relays: Vec, - /// Repository address in `naddr` format (`naddr1...`), NIP-05 format - /// (`4rs.nl/n34` or `_@4rs.nl/n34`), or a set name like `kernel`. - #[arg(value_name = "NADDR-NIP05-OR-SET", long = "repo")] + /// Repository addresses + /// + /// In `naddr` format (`naddr1...`), NIP-05 format (`4rs.nl/n34` or + /// `_@4rs.nl/n34`), or a set name like `kernel`, separated by commas. + #[arg( + value_name = "NADDR-NIP05-OR-SET", + long = "repo", + value_delimiter = ',' + )] naddrs: Vec, /// Replace existing relays/repositories instead of adding to them #[arg(long = "override")]