summaryrefslogtreecommitdiffstats
path: root/tool
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@pep.foundation>2019-06-18 13:17:34 +0200
committerNeal H. Walfield <neal@pep.foundation>2019-06-18 15:11:05 +0200
commit2eece6543e80ba1033b91ce5f777d7d22606c64a (patch)
treee47318386ca15ea3b043f3b1b43a54de6ff4dc7b /tool
parent27fae4b350a27464760605a20901022476fe837c (diff)
tool: Fix argument parsing for the wkd subcommand
- 'sq wkd get email@example.net' and 'sq wkd url email@example.net' just print the help screen. - Use the clap options like other commands do.
Diffstat (limited to 'tool')
-rw-r--r--tool/src/sq-usage.rs15
-rw-r--r--tool/src/sq_cli.rs8
2 files changed, 9 insertions, 14 deletions
diff --git a/tool/src/sq-usage.rs b/tool/src/sq-usage.rs
index ffbb9ea3..b77f2809 100644
--- a/tool/src/sq-usage.rs
+++ b/tool/src/sq-usage.rs
@@ -634,7 +634,7 @@
//! Interacts with Web Key Directories
//!
//! USAGE:
-//! sq wkd [SUBCOMMAND]
+//! sq wkd <SUBCOMMAND>
//!
//! FLAGS:
//! -h, --help Prints help information
@@ -644,7 +644,7 @@
//! get Writes to the standard output the Transferable Public Key retrieved from a Web Key Directory, given an
//! email address
//! help Prints this message or the help of the given subcommand(s)
-//! url Prints the Web Key Directory URl of an email address.
+//! url Prints the Web Key Directory URL of an email address.
//! ```
//!
//! ### Subcommand wkd get
@@ -653,7 +653,7 @@
//! Writes to the standard output the Transferable Public Key retrieved from a Web Key Directory, given an email address
//!
//! USAGE:
-//! sq wkd get [FLAGS] [EMAIL_ADDRESS]
+//! sq wkd get [FLAGS] <EMAIL_ADDRESS>
//!
//! FLAGS:
//! -B, --binary Don't ASCII-armor encode the OpenPGP data
@@ -664,18 +664,13 @@
//! <EMAIL_ADDRESS> The email address from which to obtain the TPK from a WKD.
//! ```
//!
-//! ### Subcommand wkd email
-//!
-//! ```text
-//! ```
-//!
//! ### Subcommand wkd url
//!
//! ```text
-//! Prints the Web Key Directory URl of an email address.
+//! Prints the Web Key Directory URL of an email address.
//!
//! USAGE:
-//! sq wkd url [EMAIL_ADDRESS]
+//! sq wkd url <EMAIL_ADDRESS>
//!
//! FLAGS:
//! -h, --help Prints help information
diff --git a/tool/src/sq_cli.rs b/tool/src/sq_cli.rs
index 5aae1a7b..0bbbf3b7 100644
--- a/tool/src/sq_cli.rs
+++ b/tool/src/sq_cli.rs
@@ -436,23 +436,23 @@ pub fn build() -> App<'static, 'static> {
.subcommand(SubCommand::with_name("wkd")
.about("Interacts with Web Key Directories")
- .setting(AppSettings::ArgRequiredElseHelp)
+ .setting(AppSettings::SubcommandRequiredElseHelp)
.subcommand(SubCommand::with_name("url")
- .setting(AppSettings::SubcommandRequiredElseHelp)
- .about("Prints the Web Key Directory URl of \
+ .about("Prints the Web Key Directory URL of \
an email address.")
.arg(Arg::with_name("input")
.value_name("EMAIL_ADDRESS")
+ .required(true)
.help("The email address from which to \
obtain the WKD URI.")))
.subcommand(SubCommand::with_name("get")
- .setting(AppSettings::SubcommandRequiredElseHelp)
.about("Writes to the standard output the \
Transferable Public Key retrieved \
from a Web Key Directory, given an \
email address")
.arg(Arg::with_name("input")
.value_name("EMAIL_ADDRESS")
+ .required(true)
.help("The email address from which to \
obtain the TPK from a WKD."))
.arg(Arg::with_name("binary")