aboutsummaryrefslogtreecommitdiffstats
path: root/mumctl/src
diff options
context:
space:
mode:
authorGustav Sörnäs <gustav@sornas.net>2020-10-19 16:34:02 +0200
committerGustav Sörnäs <gustav@sornas.net>2020-10-19 16:34:02 +0200
commit034efb9431897c098f859286b059298ea1123471 (patch)
treee7c57626a14ae3e597881d6130e52d7c8d520668 /mumctl/src
parent130059b4270dde7c49fd1e86e7400d5e611ee790 (diff)
downloadmum-034efb9431897c098f859286b059298ea1123471.tar.gz
clap cleanup
Diffstat (limited to 'mumctl/src')
-rw-r--r--mumctl/src/main.rs56
1 files changed, 33 insertions, 23 deletions
diff --git a/mumctl/src/main.rs b/mumctl/src/main.rs
index f35c826..5e6ce84 100644
--- a/mumctl/src/main.rs
+++ b/mumctl/src/main.rs
@@ -30,51 +30,61 @@ fn main() {
.setting(AppSettings::ArgRequiredElseHelp)
.subcommand(
SubCommand::with_name("connect")
- .setting(AppSettings::ArgRequiredElseHelp)
.arg(Arg::with_name("host").required(true))
.arg(Arg::with_name("username").required(true))
- .arg(Arg::with_name("port").short("p").long("port").takes_value(true)))
- .subcommand(SubCommand::with_name("disconnect"))
+ .arg(Arg::with_name("port")
+ .long("port")
+ .short("p")
+ .takes_value(true)))
+ .subcommand(
+ SubCommand::with_name("disconnect"))
.subcommand(
SubCommand::with_name("config")
- .setting(AppSettings::ArgRequiredElseHelp)
.arg(Arg::with_name("server_name").required(true))
.arg(Arg::with_name("var_name").required(true))
.arg(Arg::with_name("var_value").required(true)))
.subcommand(
SubCommand::with_name("rename")
- .setting(AppSettings::ArgRequiredElseHelp)
.arg(Arg::with_name("prev_name").required(true))
.arg(Arg::with_name("next_name").required(true)))
.subcommand(
SubCommand::with_name("add")
- .setting(AppSettings::ArgRequiredElseHelp)
.arg(Arg::with_name("name").required(true))
.arg(Arg::with_name("host").required(true))
- .arg(Arg::with_name("port").long("port").takes_value(true).default_value("64738"))
- .arg(Arg::with_name("username").long("username").takes_value(true))
- .arg(Arg::with_name("password").long("password").takes_value(true))))
+ .arg(Arg::with_name("port")
+ .long("port")
+ .takes_value(true)
+ .default_value("64738"))
+ .arg(Arg::with_name("username")
+ .long("username")
+ .takes_value(true))
+ .arg(Arg::with_name("password")
+ .long("password")
+ .takes_value(true))))
.subcommand(
SubCommand::with_name("channel")
.setting(AppSettings::ArgRequiredElseHelp)
.subcommand(
SubCommand::with_name("list")
- .arg(Arg::with_name("short").short("s").long("short")))
+ .arg(Arg::with_name("short")
+ .long("short")
+ .short("s")))
.subcommand(
- SubCommand::with_name("connect").arg(Arg::with_name("channel").required(true))))
- .subcommand(SubCommand::with_name("status"))
- .subcommand(SubCommand::with_name("config")
- .arg(Arg::with_name("name")
- .required(true))
- .arg(Arg::with_name("value")
- .required(true)))
+ SubCommand::with_name("connect")
+ .arg(Arg::with_name("channel").required(true))))
+ .subcommand(
+ SubCommand::with_name("status"))
+ .subcommand(
+ SubCommand::with_name("config")
+ .arg(Arg::with_name("name").required(true))
+ .arg(Arg::with_name("value").required(true)))
.subcommand(SubCommand::with_name("completions")
- .arg(Arg::with_name("zsh")
- .long("zsh"))
- .arg(Arg::with_name("bash")
- .long("bash"))
- .arg(Arg::with_name("fish")
- .long("fish")));
+ .arg(Arg::with_name("zsh")
+ .long("zsh"))
+ .arg(Arg::with_name("bash")
+ .long("bash"))
+ .arg(Arg::with_name("fish")
+ .long("fish")));
let matches = app.clone().get_matches();