-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
188 additions
and
31 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
use clap::Parser; | ||
|
||
/// # Long help | ||
/// | ||
/// This should only be printed for long help. | ||
/// # Help | ||
/// | ||
/// This should be printed for both short and long help. | ||
#[derive(Parser, Debug)] | ||
struct Args { | ||
/// This is _italic and **bold** just italic_ ~struck through~. | ||
#[arg(short, long)] | ||
name: String, | ||
|
||
/// Short help | ||
/// | ||
/// Only in long help: | ||
/// | ||
/// 3. This | ||
/// 5. is | ||
/// 1. a | ||
/// 2. multi level | ||
/// 5. list | ||
/// | ||
/// - so | ||
/// - is | ||
/// - this | ||
/// - even | ||
/// - though | ||
/// - unordered | ||
#[arg(short, long, default_value_t = 1)] | ||
count: u8, | ||
} | ||
|
||
fn main() { | ||
Args::parse(); | ||
} |