summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustus Winter <justus@sequoia-pgp.org>2021-01-21 08:27:06 +0100
committerJustus Winter <justus@sequoia-pgp.org>2021-01-21 08:27:06 +0100
commit21210e99db03f3dee42fcc8107cc4f72ba0d6222 (patch)
tree9c87e6b7a7877245da97057da7e5278da2d170b2
parent23527ebce221c0a0fc63c3583b67b57b21d73cf3 (diff)
sq: Consistency.
-rw-r--r--sq/src/sq-usage.rs96
-rw-r--r--sq/src/sq_cli.rs36
2 files changed, 62 insertions, 70 deletions
diff --git a/sq/src/sq-usage.rs b/sq/src/sq-usage.rs
index 8af9b767..f3c9c61c 100644
--- a/sq/src/sq-usage.rs
+++ b/sq/src/sq-usage.rs
@@ -28,6 +28,7 @@
//! merge-signatures Merges two signatures
//! key Manipulates keys
//! certring Manipulates certificate rings
+//! certify Certify a User ID for a Certificate
//! autocrypt Autocrypt support
//! keyserver Interacts with keyservers
//! wkd Interacts with Web Key Directories
@@ -35,7 +36,6 @@
//! dearmor Removes ASCII Armor from a file
//! inspect Inspects data, like file(1)
//! packet Packet manipulation
-//! certify Certify a User ID for a Certificate
//! help Prints this message or the help of the given
//! subcommand(s)
//! ```
@@ -411,6 +411,53 @@
//! <FILE> Sets the input file to use
//! ```
//!
+//! ## Subcommand certify
+//!
+//! ```text
+//! Certify a User ID for a Certificate
+//!
+//! USAGE:
+//! sq certify [FLAGS] [OPTIONS] <CERTIFIER> <CERTIFICATE> <USERID>
+//!
+//! FLAGS:
+//! -h, --help Prints help information
+//! -l, --local Makes the certification a local certification.
+//! Normally, local certifications are not exported.
+//! --non-revocable Marks the certification as being non-revocable. That
+//! is, you cannot later revoke this certification. This
+//! should normally only be used with an expiration.
+//!
+//! OPTIONS:
+//! -a, --amount <TRUST_AMOUNT>
+//! The amount of trust. Values between 1 and 120 are meaningful. 120
+//! means fully trusted. Values less than 120 indicate the degree of
+//! trust. 60 is usually used for partially trusted. The default is
+//! 120.
+//! -d, --depth <TRUST_DEPTH>
+//! The trust depth (sometimes referred to as the trust level). 0 means
+//! a normal certification of <CERTIFICATE, USERID>. 1 means
+//! CERTIFICATE is also a trusted introducer, 2 means CERTIFICATE is a
+//! meta-trusted introducer, etc. The default is 0.
+//! --expires <TIME>
+//! Absolute time when the certification should expire, or 'never'.
+//!
+//! --expires-in <DURATION>
+//! Relative time when the certification should expire. Either
+//! 'N[ymwd]', for N years, months, weeks, or days, or 'never'. The
+//! default is 5 years.
+//! -r, --regex <REGEX>...
+//! Adds a regular expression to constrain what a trusted introducer can
+//! certify. The regular expression must match the certified User ID in
+//! all intermediate introducers, and the certified certificate.
+//! Multiple regular expressions may be specified. In that case, at
+//! least one must match.
+//!
+//! ARGS:
+//! <CERTIFIER> The key to certify the certificate.
+//! <CERTIFICATE> The certificate to certify.
+//! <USERID> The User ID to certify.
+//! ```
+//!
//! ## Subcommand autocrypt
//!
//! ```text
@@ -776,53 +823,6 @@
//! ARGS:
//! <FILE> Sets the input file to use
//! ```
-//!
-//! ## Subcommand certify
-//!
-//! ```text
-//! Certify a User ID for a Certificate
-//!
-//! USAGE:
-//! sq certify [FLAGS] [OPTIONS] <CERTIFIER> <CERTIFICATE> <USERID>
-//!
-//! FLAGS:
-//! -h, --help Prints help information
-//! -l, --local Makes the certification a local certification.
-//! Normally, local certifications are not exported.
-//! --non-revocable Marks the certification as being non-revocable. That
-//! is, you cannot later revoke this certification. This
-//! should normally only be used with an expiration.
-//!
-//! OPTIONS:
-//! -a, --amount <TRUST_AMOUNT>
-//! The amount of trust. Values between 1 and 120 are meaningful. 120
-//! means fully trusted. Values less than 120 indicate the degree of
-//! trust. 60 is usually used for partially trusted. The default is
-//! 120.
-//! -d, --depth <TRUST_DEPTH>
-//! The trust depth (sometimes referred to as the trust level). 0 means
-//! a normal certification of <CERTIFICATE, USERID>. 1 means
-//! CERTIFICATE is also a trusted introducer, 2 means CERTIFICATE is a
-//! meta-trusted introducer, etc. The default is 0.
-//! --expires <TIME>
-//! Absolute time when the certification should expire, or 'never'.
-//!
-//! --expires-in <DURATION>
-//! Relative time when the certification should expire. Either
-//! 'N[ymwd]', for N years, months, weeks, or days, or 'never'. The
-//! default is 5 years.
-//! -r, --regex <REGEX>...
-//! Adds a regular expression to constrain what a trusted introducer can
-//! certify. The regular expression must match the certified User ID in
-//! all intermediate introducers, and the certified certificate.
-//! Multiple regular expressions may be specified. In that case, at
-//! least one must match.
-//!
-//! ARGS:
-//! <CERTIFIER> The key to certify the certificate.
-//! <CERTIFICATE> The certificate to certify.
-//! <USERID> The User ID to certify.
-//! ```
#![doc(html_favicon_url = "https://docs.sequoia-pgp.org/favicon.png")]
#![doc(html_logo_url = "https://docs.sequoia-pgp.org/logo.svg")]
diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs
index 8bdd6ea0..77f14e0a 100644
--- a/sq/src/sq_cli.rs
+++ b/sq/src/sq_cli.rs
@@ -466,30 +466,28 @@ pub fn configure(app: App<'static, 'static>) -> App<'static, 'static> {
.subcommand(SubCommand::with_name("certify")
+ .display_order(320)
.about("Certify a User ID for a Certificate")
.arg(Arg::with_name("depth")
- .value_name("TRUST_DEPTH")
+ .short("d").long("depth").value_name("TRUST_DEPTH")
.help("The trust depth (sometimes referred to as \
the trust level). 0 means a normal \
certification of <CERTIFICATE, USERID>. \
1 means CERTIFICATE is also a trusted \
introducer, 2 means CERTIFICATE is a \
meta-trusted introducer, etc. The \
- default is 0.")
- .long("depth")
- .short("d"))
+ default is 0."))
.arg(Arg::with_name("amount")
- .value_name("TRUST_AMOUNT")
+ .short("a").long("amount").value_name("TRUST_AMOUNT")
.help("The amount of trust. \
Values between 1 and 120 are meaningful. \
120 means fully trusted. \
Values less than 120 indicate the degree \
of trust. 60 is usually used for partially \
- trusted. The default is 120.")
- .long("amount")
- .short("a"))
+ trusted. The default is 120."))
.arg(Arg::with_name("regex")
- .value_name("REGEX")
+ .short("r").long("regex").value_name("REGEX")
+ .multiple(true).number_of_values(1)
.help("Adds a regular expression to constrain \
what a trusted introducer can certify. \
The regular expression must match \
@@ -497,33 +495,27 @@ pub fn configure(app: App<'static, 'static>) -> App<'static, 'static> {
introducers, and the certified certificate. \
Multiple regular expressions may be \
specified. In that case, at least \
- one must match.")
- .long("regex")
- .short("r")
- .multiple(true))
+ one must match."))
.arg(Arg::with_name("local")
+ .short("l").long("local")
.help("Makes the certification a local \
certification. Normally, local \
- certifications are not exported.")
- .long("local")
- .short("l"))
+ certifications are not exported."))
.arg(Arg::with_name("non-revocable")
+ .long("non-revocable")
.help("Marks the certification as being non-revocable. \
That is, you cannot later revoke this \
certification. This should normally only \
- be used with an expiration.")
- .long("non-revocable"))
+ be used with an expiration."))
.group(ArgGroup::with_name("expiration-group")
.args(&["expires", "expires-in"]))
.arg(Arg::with_name("expires")
- .value_name("TIME")
- .long("expires")
+ .long("expires").value_name("TIME")
.help("Absolute time when the certification should \
expire, or 'never'."))
.arg(Arg::with_name("expires-in")
- .value_name("DURATION")
- .long("expires-in")
+ .long("expires-in").value_name("DURATION")
// Catch negative numbers.
.allow_hyphen_values(true)
.help("Relative time when the certification should \