Flag parsing bugfix

This commit is contained in:
Jeremy Wall 2023-08-14 18:38:00 -04:00
parent a57d6f9551
commit 5cfed8963f
2 changed files with 3 additions and 4 deletions

2
Cargo.lock generated
View File

@ -295,7 +295,7 @@ dependencies = [
[[package]]
name = "runwhen"
version = "0.0.5"
version = "0.0.6"
dependencies = [
"clap",
"humantime",

View File

@ -45,10 +45,9 @@ fn do_flags() -> clap::ArgMatches {
.about("Trigger that fires when a file or directory changes.")
.arg(
arg!(-f --file)
.name("filetouch")
.value_parser(value_parser!(PathBuf)).help("File or directory to watch for changes"),
.takes_value(true).value_parser(value_parser!(PathBuf)).help("File or directory to watch for changes"),
)
.arg(arg!(--touch).help("Use file or directory timestamps to monitor for changes."))
.arg(arg!(--touch).name("filetouch").help("Use file or directory timestamps to monitor for changes."))
.arg(arg!(--poll).value_parser(value_parser!(humantime::Duration)).help("Duration of time between polls")))
.subcommand(
clap::Command::new("timer")