summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilipp Gesang <phg@phi-gamma.net>2021-12-12 11:48:15 +0100
committerPhilipp Gesang <phg@phi-gamma.net>2021-12-12 11:48:25 +0100
commit33d3f2b30d77f242ed0a6a228a9f183778504640 (patch)
tree94127ee63e5b5b445371063313a3a8a00b7cc8d4 /src
parent8b94f8a7ed57af0b5bfad7da072ee213a530441f (diff)
downloadvtcol-33d3f2b30d77f242ed0a6a228a9f183778504640.tar.gz
bin: make --verbose a global argument
It shouldn’t matter where exactly it appears on the command line.
Diffstat (limited to 'src')
-rw-r--r--src/vtcol.rs3
1 files changed, 2 insertions, 1 deletions
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<Job>
{
- 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")