Skip to content

Commit e03d2cd

Browse files
committed
Set number of args to 0 for no-replace and list
In case of clap 4, it is necessary to set the number of args to 0, if the option does not take any parameter.
1 parent b1c8362 commit e03d2cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/main.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,13 @@ fn config() -> Result<Config> {
196196
.arg(
197197
Arg::new("no-replace")
198198
.short('n')
199+
.num_args(0)
199200
.help("When adding, don't replace an existing key with the given name."),
200201
)
201202
.arg(
202203
Arg::new("list")
203204
.short('l')
205+
.num_args(0)
204206
.help("List the names and number of keys currently installed."),
205207
)
206208
.arg(

0 commit comments

Comments
 (0)