docs(builder): Add help text

This commit is contained in:
mattmadeofpasta 2022-10-04 18:54:03 +00:00
parent b03b60edd1
commit e644a5ef66
No known key found for this signature in database
GPG key ID: 020D6BD1B8975037
2 changed files with 23 additions and 3 deletions

View file

@ -4,11 +4,31 @@ A simple to use, efficient, and full-featured Command Line Argument Parser
Usage: 04_01_enum[EXE] <MODE>
Arguments:
<MODE>
What mode to run the program in
Possible values:
- fast: Run swiftly
- slow: Crawl slowly but steadily
Options:
-h, --help
Print help information (use `-h` for a summary)
-V, --version
Print version information
$ 04_01_enum -h
A simple to use, efficient, and full-featured Command Line Argument Parser
Usage: 04_01_enum[EXE] <MODE>
Arguments:
<MODE> What mode to run the program in [possible values: fast, slow]
Options:
-h, --help Print help information
-h, --help Print help information (use `--help` for more detail)
-V, --version Print version information
$ 04_01_enum fast

View file

@ -14,8 +14,8 @@ impl ValueEnum for Mode {
fn to_possible_value<'a>(&self) -> Option<PossibleValue> {
Some(match self {
Mode::Fast => PossibleValue::new("fast"),
Mode::Slow => PossibleValue::new("slow"),
Mode::Fast => PossibleValue::new("fast").help("Run swiftly"),
Mode::Slow => PossibleValue::new("slow").help("Crawl slowly but steadily"),
})
}
}