diff options
author | Jesse Luehrs <doy@tozt.net> | 2018-11-10 05:06:49 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2018-11-10 05:06:49 -0500 |
commit | 3169d8dd1ea043cf1a987ea4adf3f73122863832 (patch) | |
tree | be8d8eead5783d401f8bd157d34a710832deb886 | |
parent | baaf4968270dc6019289faafa56a84b2045286f6 (diff) | |
download | lastfm-query-3169d8dd1ea043cf1a987ea4adf3f73122863832.tar.gz lastfm-query-3169d8dd1ea043cf1a987ea4adf3f73122863832.zip |
disable --version on subcommands
-rw-r--r-- | src/cmd/mod.rs | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/cmd/mod.rs b/src/cmd/mod.rs index 1cbe362..813a27a 100644 --- a/src/cmd/mod.rs +++ b/src/cmd/mod.rs @@ -13,10 +13,15 @@ pub fn run() -> failure::Fallible<()> { } fn get_command() -> failure::Fallible<Box<Command>> { + let subcommands = vec![ + sync::subcommand(), + sql::subcommand(), + recommend::subcommand(), + ]; let matches = app_from_crate!() - .subcommand(sync::subcommand()) - .subcommand(sql::subcommand()) - .subcommand(recommend::subcommand()) + .subcommands(subcommands.into_iter().map(|s| { + s.setting(clap::AppSettings::DisableVersion) + })) .get_matches(); let command: Box<Command> = match matches.subcommand() { |