Added --copy-config and set order within help

This commit is contained in:
Marko Korhonen 2020-01-21 20:59:06 +02:00
parent 242c982565
commit afe4572988
No known key found for this signature in database
GPG key ID: 911B85FBC6003FE5

View file

@ -12,6 +12,7 @@ pub fn get_args() -> clap::ArgMatches<'static> {
.long("dim") .long("dim")
.short("d") .short("d")
.takes_value(false) .takes_value(false)
.display_order(1)
.help("Dims the screen to idle level set in configuration"), .help("Dims the screen to idle level set in configuration"),
) )
.arg( .arg(
@ -19,13 +20,22 @@ pub fn get_args() -> clap::ArgMatches<'static> {
.long("resume") .long("resume")
.short("r") .short("r")
.takes_value(false) .takes_value(false)
.display_order(2)
.help("Sets the backlight to the value it was before dimming"), .help("Sets the backlight to the value it was before dimming"),
) )
.arg(
Arg::with_name("copy-config")
.long("copy-config")
.takes_value(false)
.display_order(3)
.help("Copies the default config file to $XDG_CONFIG_HOME/lqsd"),
)
.arg( .arg(
Arg::with_name("config") Arg::with_name("config")
.long("config") .long("config")
.short("c")
.takes_value(true) .takes_value(true)
.number_of_values(1)
.value_name("FILE")
.help("Sets a custom config file"), .help("Sets a custom config file"),
) )
.get_matches() .get_matches()