Skip to content

Commit

Permalink
Set number of args to 0 for no-replace and list
Browse files Browse the repository at this point in the history
In case of clap 4, it is necessary to set the number of args to 0,
if the option does not take any parameter.
  • Loading branch information
dongsupark committed Nov 14, 2023
1 parent b1c8362 commit e03d2cd
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,11 +196,13 @@ fn config() -> Result<Config> {
.arg(
Arg::new("no-replace")
.short('n')
.num_args(0)
.help("When adding, don't replace an existing key with the given name."),
)
.arg(
Arg::new("list")
.short('l')
.num_args(0)
.help("List the names and number of keys currently installed."),
)
.arg(
Expand Down

0 comments on commit e03d2cd

Please sign in to comment.