mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-01-19 00:57:53 +00:00
use long names
This commit is contained in:
parent
3a8ebca75e
commit
0eb1534e42
2 changed files with 5 additions and 5 deletions
|
@ -42,20 +42,20 @@ pub fn build_cli() -> App<'static> {
|
|||
.help("Prints current brightness value"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("zer")
|
||||
Arg::with_name("zero")
|
||||
.short('z')
|
||||
.long("zero")
|
||||
.help("Sets brightness to lowest value"),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("ful")
|
||||
Arg::with_name("full")
|
||||
.short('f')
|
||||
.long("full")
|
||||
.help("Sets brightness to highest value"),
|
||||
)
|
||||
.group(
|
||||
ArgGroup::with_name("brightness_control")
|
||||
.args(&["set", "inc", "dec", "get", "zer", "ful"]),
|
||||
.args(&["set", "inc", "dec", "get", "zero", "full"]),
|
||||
)
|
||||
.arg(
|
||||
Arg::with_name("list")
|
||||
|
|
|
@ -42,9 +42,9 @@ fn main() {
|
|||
controller.set_brightness(new_value.max(0));
|
||||
} else if matches.is_present("get") {
|
||||
println!("{}", controller.get_brightness());
|
||||
} else if matches.is_present("zer") {
|
||||
} else if matches.is_present("zero") {
|
||||
controller.set_brightness(0);
|
||||
} else if matches.is_present("ful") {
|
||||
} else if matches.is_present("full") {
|
||||
controller.set_brightness(controller.get_max_brightness());
|
||||
} else {
|
||||
build_cli().print_long_help().unwrap();
|
||||
|
|
Loading…
Reference in a new issue