mirror of
https://github.com/clap-rs/clap
synced 2024-12-14 14:52:33 +00:00
commit
20101a5785
2 changed files with 6 additions and 8 deletions
|
@ -17,9 +17,11 @@ macro_rules! create_app {
|
|||
Arg::from("[flag2] -F 'tests flags with exclusions'")
|
||||
.conflicts_with("flag")
|
||||
.requires("option2"),
|
||||
Arg::from("--long-option-2 [option2] 'tests long options with exclusions'")
|
||||
.conflicts_with("option")
|
||||
.requires("positional2"),
|
||||
Arg::from(
|
||||
"[option2] --long-option-2 [option2] 'tests long options with exclusions'",
|
||||
)
|
||||
.conflicts_with("option")
|
||||
.requires("positional2"),
|
||||
Arg::from("[positional2] 'tests positionals with exclusions'"),
|
||||
Arg::from("-O --Option [option3] 'tests options with specific value sets'")
|
||||
.possible_values(OPT3_VALS),
|
||||
|
|
|
@ -47,7 +47,6 @@ fn app_example3<'c>() -> App<'c> {
|
|||
.long("config"),
|
||||
Arg::new("input")
|
||||
.help("the input file to use")
|
||||
.index(1)
|
||||
.setting(ArgSettings::Required),
|
||||
])
|
||||
.arg("--license 'display the license file'")
|
||||
|
@ -86,9 +85,7 @@ fn app_example5<'c>() -> App<'c> {
|
|||
.help("turns up the awesome")
|
||||
.short('a')
|
||||
.long("awesome")
|
||||
.setting(ArgSettings::MultipleOccurrences)
|
||||
.requires("config")
|
||||
.conflicts_with("output"),
|
||||
.setting(ArgSettings::MultipleOccurrences),
|
||||
)
|
||||
}
|
||||
|
||||
|
@ -99,7 +96,6 @@ fn app_example6<'c>() -> App<'c> {
|
|||
.help("the input file to use")
|
||||
.index(1)
|
||||
.requires("config")
|
||||
.conflicts_with("output")
|
||||
.setting(ArgSettings::Required),
|
||||
)
|
||||
.arg(Arg::new("config").help("the config file to use").index(2))
|
||||
|
|
Loading…
Reference in a new issue