cleaned up subcommand match statement

This commit is contained in:
Valerie Wolfe 2023-04-20 15:31:22 -04:00
parent 07bd6af1a9
commit d1485cf745

View file

@ -13,23 +13,24 @@ fn main() {
//let tmuxvar = var("TMUX");
match subcommand.as_deref() {
Some("h") | // help text
Some("help") => command::help(&mut args),
Some("h" | "help")
=> command::help(&mut args),
Some("a") | // attach
Some("attach") => command::attach(&mut args),
Some("a" | "attach")
=> command::attach(&mut args),
Some("has") => command::has(&mut args),
Some("has")
=> command::has(&mut args),
None |
Some("l") | // list
Some("ls") |
Some("list") => command::list(),
Some("l" | "ls" | "list")
=> command::list(),
Some("n") | // new
Some("new") => command::new(&mut args),
Some("n" | "new")
=> command::new(&mut args),
_ => error::no_subcommand(subcommand.unwrap())
_
=> error::no_subcommand(subcommand.unwrap())
}
}