From 33d3f2b30d77f242ed0a6a228a9f183778504640 Mon Sep 17 00:00:00 2001 From: Philipp Gesang Date: Sun, 12 Dec 2021 11:48:15 +0100 Subject: bin: make --verbose a global argument MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It shouldn’t matter where exactly it appears on the command line. --- src/vtcol.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/vtcol.rs b/src/vtcol.rs index 3578986..dcc7820 100644 --- a/src/vtcol.rs +++ b/src/vtcol.rs @@ -278,7 +278,7 @@ impl<'a> Job { pub fn from_argv() -> Result { - use clap::{App, Arg, SubCommand}; + use clap::{App, Arg, ArgSettings, SubCommand}; let app = App::new(clap::crate_name!()) .version(clap::crate_version!()) @@ -286,6 +286,7 @@ impl<'a> Job .about(clap::crate_description!()) .arg( Arg::with_name("verbose") + .set(ArgSettings::Global) .short("v") .long("verbose") .help("enable extra diagnostics") -- cgit v1.2.3