2183: Add `conflicts_with_all` note to docs r=pksunkara a=cbr9



Co-authored-by: KBR9 <cabero96@protonmail.com>
This commit is contained in:
bors[bot] 2020-10-24 21:39:00 +00:00 committed by GitHub
commit 04fd3369d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 5 deletions

View file

@ -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"

View file

@ -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