Require argument, else display help

Signed-off-by: Marko Korhonen <marko.korhonen@reekynet.com>
This commit is contained in:
Marko Korhonen 2020-01-19 23:16:32 +02:00
parent 8aedc96c67
commit 8d25715e55
No known key found for this signature in database
GPG key ID: 911B85FBC6003FE5

View file

@ -1,11 +1,12 @@
extern crate clap;
use clap::{App, Arg};
use clap::{App, AppSettings, Arg};
pub fn get_args() -> clap::ArgMatches<'static> {
App::new("LiQuid Screen Dim")
.version(env!("CARGO_PKG_VERSION"))
.author(env!("CARGO_PKG_AUTHORS"))
.about(env!("CARGO_PKG_DESCRIPTION"))
.setting(AppSettings::ArgRequiredElseHelp)
.arg(
Arg::with_name("dim")
.long("dim")