Skip to content

Commit 0736116

Browse files
committed
docs(lexarg): Include short help
1 parent ecc11b8 commit 0736116

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

crates/lexarg-error/examples/hello-error.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn parse_args() -> Result<Args> {
4444
.ok_or_else(|| ErrorContext::msg("invalid string").unexpected(arg))?,
4545
);
4646
}
47-
Long("help") => {
47+
Short("h") | Long("help") => {
4848
println!("Usage: hello [-n|--number=NUM] [--shout] THING");
4949
std::process::exit(0);
5050
}

crates/lexarg/examples/hello.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ fn parse_args() -> Result<Args, &'static str> {
3030
Value(val) if thing.is_none() => {
3131
thing = Some(val.to_str().ok_or("invalid string")?);
3232
}
33-
Long("help") => {
33+
Short("h") | Long("help") => {
3434
println!("Usage: hello [-n|--number=NUM] [--shout] THING");
3535
std::process::exit(0);
3636
}

0 commit comments

Comments
 (0)