From f27282fbc01d1f8415d97c7d48cc7689c5de5888 Mon Sep 17 00:00:00 2001 From: Ed Page Date: Mon, 4 Jan 2021 14:54:44 -0600 Subject: [PATCH] docs(args): Clarify what args are esclusive --- src/args.rs | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/args.rs b/src/args.rs index 047ae2c..7236652 100644 --- a/src/args.rs +++ b/src/args.rs @@ -41,6 +41,7 @@ impl Default for Format { setting = structopt::clap::AppSettings::DeriveDisplayOrder, setting = structopt::clap::AppSettings::DontCollapseArgsInUsage )] +#[structopt(group = structopt::clap::ArgGroup::with_name("mode").multiple(false))] pub(crate) struct Args { #[structopt(parse(from_os_str), default_value = ".")] /// Paths to check with `-` for stdin @@ -54,23 +55,23 @@ pub(crate) struct Args { /// Ignore implicit configuration files. pub(crate) isolated: bool, - #[structopt(long)] + #[structopt(long, group = "mode")] /// Print a diff of what would change pub(crate) diff: bool, - #[structopt(long, short = "w")] + #[structopt(long, short = "w", group = "mode")] /// Write fixes out pub(crate) write_changes: bool, - #[structopt(long)] + #[structopt(long, group = "mode")] /// Debug: Print each file that would be spellchecked. pub(crate) files: bool, - #[structopt(long)] + #[structopt(long, group = "mode")] /// Debug: Print each identifier that would be spellchecked. pub(crate) identifiers: bool, - #[structopt(long)] + #[structopt(long, group = "mode")] /// Debug: Print each word that would be spellchecked. pub(crate) words: bool,