diff options
| author | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-20 10:41:58 +0000 |
|---|---|---|
| committer | DanConwayDev <DanConwayDev@protonmail.com> | 2026-02-20 10:41:58 +0000 |
| commit | b916c35d7686e2e3673f453f02770fa443b90a16 (patch) | |
| tree | adc6d2377898ea39dfeae8a0b511d0e846d9fce5 /src/bin/ngit/cli.rs | |
| parent | ade81dc3466ac266e43fe370f1532f5e2bf53dd1 (diff) | |
fix: show ID|nevent in usage for apply, checkout and list commands
Adds value_name attribute to the id argument so the usage line reads
`<ID|nevent>` instead of `<ID>`, making nevent bech32 support discoverable
without reading --help.
Diffstat (limited to 'src/bin/ngit/cli.rs')
| -rw-r--r-- | src/bin/ngit/cli.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bin/ngit/cli.rs b/src/bin/ngit/cli.rs index 7baa1d3..037d17f 100644 --- a/src/bin/ngit/cli.rs +++ b/src/bin/ngit/cli.rs | |||
| @@ -120,6 +120,7 @@ pub enum Commands { | |||
| 120 | #[arg(long)] | 120 | #[arg(long)] |
| 121 | json: bool, | 121 | json: bool, |
| 122 | /// Show details for specific proposal (event-id or nevent) | 122 | /// Show details for specific proposal (event-id or nevent) |
| 123 | #[arg(value_name = "ID|nevent")] | ||
| 123 | id: Option<String>, | 124 | id: Option<String>, |
| 124 | /// Use local cache only, skip network fetch | 125 | /// Use local cache only, skip network fetch |
| 125 | #[arg(long)] | 126 | #[arg(long)] |
| @@ -131,6 +132,7 @@ pub enum Commands { | |||
| 131 | )] | 132 | )] |
| 132 | Checkout { | 133 | Checkout { |
| 133 | /// Proposal event-id (hex) or nevent (bech32) | 134 | /// Proposal event-id (hex) or nevent (bech32) |
| 135 | #[arg(value_name = "ID|nevent")] | ||
| 134 | id: String, | 136 | id: String, |
| 135 | /// Use local cache only, skip network fetch | 137 | /// Use local cache only, skip network fetch |
| 136 | #[arg(long)] | 138 | #[arg(long)] |
| @@ -142,6 +144,7 @@ pub enum Commands { | |||
| 142 | )] | 144 | )] |
| 143 | Apply { | 145 | Apply { |
| 144 | /// Proposal event-id or nevent | 146 | /// Proposal event-id or nevent |
| 147 | #[arg(value_name = "ID|nevent")] | ||
| 145 | id: String, | 148 | id: String, |
| 146 | /// Output patches to stdout instead of applying | 149 | /// Output patches to stdout instead of applying |
| 147 | #[arg(long)] | 150 | #[arg(long)] |