diff options
author | Justus Winter <justus@sequoia-pgp.org> | 2018-09-07 17:08:26 +0200 |
---|---|---|
committer | Justus Winter <justus@sequoia-pgp.org> | 2018-09-07 17:08:26 +0200 |
commit | a2649cb7a58e17f3f6a083a97321c35ed954be2b (patch) | |
tree | 700b9a494a44b988f39feb89013cbc16e5e42e93 /tool/src/sq_cli.rs | |
parent | 00aff402d64e16707ff61f5f2afd44ea327d79ea (diff) |
tool: Print help if subsubcommand is missing.
- Fixes #79.
Diffstat (limited to 'tool/src/sq_cli.rs')
-rw-r--r-- | tool/src/sq_cli.rs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tool/src/sq_cli.rs b/tool/src/sq_cli.rs index 0b10d3d8..72c596d0 100644 --- a/tool/src/sq_cli.rs +++ b/tool/src/sq_cli.rs @@ -143,6 +143,7 @@ pub fn build() -> App<'static, 'static> { .help("Sets the output file to use"))) .subcommand(SubCommand::with_name("autocrypt") .about("Autocrypt support") + .setting(AppSettings::ArgRequiredElseHelp) .subcommand(SubCommand::with_name("decode") .about("Converts Autocrypt-encoded keys to OpenPGP TPKs") .arg(Arg::with_name("input").value_name("FILE") @@ -179,6 +180,7 @@ pub fn build() -> App<'static, 'static> { .subcommand(SubCommand::with_name("keyserver") .display_order(40) .about("Interacts with keyservers") + .setting(AppSettings::ArgRequiredElseHelp) .arg(Arg::with_name("server").value_name("URI") .long("server") .short("s") @@ -203,6 +205,7 @@ pub fn build() -> App<'static, 'static> { .subcommand(SubCommand::with_name("store") .display_order(30) .about("Interacts with key stores") + .setting(AppSettings::ArgRequiredElseHelp) .subcommand(SubCommand::with_name("list") .about("Lists keys in the store")) .subcommand(SubCommand::with_name("add") @@ -253,6 +256,7 @@ pub fn build() -> App<'static, 'static> { .help("List messages related to this label")))) .subcommand(SubCommand::with_name("list") .about("Lists key stores and known keys") + .setting(AppSettings::ArgRequiredElseHelp) .subcommand(SubCommand::with_name("stores") .about("Lists key stores") .arg(Arg::with_name("prefix").value_name("PREFIX") |