Merge pull request #236 from LovecraftianHorror/make-some-flags-global

Make yes, no, and accessible flags global
This commit is contained in:
João Marcos Bezerra 2022-01-12 22:49:52 -03:00 committed by GitHub
commit a777940a57
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,15 +12,15 @@ use clap::{Parser, ValueHint};
#[clap(version)]
pub struct Opts {
/// Skip [Y/n] questions positively.
#[clap(short, long, conflicts_with = "no")]
#[clap(short, long, conflicts_with = "no", global = true)]
pub yes: bool,
/// Skip [Y/n] questions negatively.
#[clap(short, long)]
#[clap(short, long, global = true)]
pub no: bool,
/// Activate accessibility mode, reducing visual noise
#[clap(short = 'A', long, env = "ACCESSIBLE")]
#[clap(short = 'A', long, env = "ACCESSIBLE", global = true)]
pub accessible: bool,
/// Ouch and claps subcommands