mirror of
https://github.com/clap-rs/clap
synced 2024-09-20 14:31:58 +00:00
Add docs about conflicts_with_all usage in yaml
add note about conflicts_with yaml option add note about conflicts_with yaml option fix wrapping remove unnecessary sentence remove note from conflicts_with
This commit is contained in:
parent
88ac1f1803
commit
625c201f65
2 changed files with 12 additions and 5 deletions
|
@ -69,10 +69,14 @@
|
|||
"type": "boolean"
|
||||
},
|
||||
"conflicts_with": {
|
||||
"type": "string"
|
||||
},
|
||||
"conflicts_with_all": {
|
||||
"$ref": "#/structures/arrayStrUnique"
|
||||
"anyOf": [
|
||||
{
|
||||
"type": "string"
|
||||
},
|
||||
{
|
||||
"$ref": "#/structures/arrayStrUnique"
|
||||
}
|
||||
]
|
||||
},
|
||||
"default_value": {
|
||||
"type": "string"
|
||||
|
|
|
@ -885,7 +885,7 @@ impl<'help> Arg<'help> {
|
|||
self
|
||||
}
|
||||
|
||||
/// The same as [`Arg::conflicts_with`] but allows specifying multiple two-way conlicts per
|
||||
/// The same as [`Arg::conflicts_with`] but allows specifying multiple two-way conflicts per
|
||||
/// argument.
|
||||
///
|
||||
/// **NOTE:** Conflicting rules take precedence over being required by default. Conflict rules
|
||||
|
@ -895,6 +895,9 @@ impl<'help> Arg<'help> {
|
|||
/// (i.e. if A conflicts with B, defining A.conflicts_with(B) is sufficient. You do not need
|
||||
/// need to also do B.conflicts_with(A))
|
||||
///
|
||||
/// **NOTE:** This option does not exist when using a YAML configuration file. Using [`Arg::conflicts_with`]
|
||||
/// followed by an array of strings will achieve the equivalent effect.
|
||||
///
|
||||
/// **NOTE:** [`Arg::exclusive(true)`] allows specifying an argument which conflicts with every other argument.
|
||||
///
|
||||
/// # Examples
|
||||
|
|
Loading…
Reference in a new issue