summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sqv/build.rs2
-rw-r--r--sqv/src/sqv-usage.rs23
-rw-r--r--sqv/src/sqv_cli.rs6
3 files changed, 20 insertions, 11 deletions
diff --git a/sqv/build.rs b/sqv/build.rs
index f96d7c8b..d638eea5 100644
--- a/sqv/build.rs
+++ b/sqv/build.rs
@@ -13,7 +13,7 @@ fn main() {
// XXX: Revisit once
// https://github.com/rust-lang/rust/issues/44732 is stabilized.
- let mut sqv = sqv_cli::build();
+ let mut sqv = sqv_cli::configure(clap::App::new("sqv").set_term_width(80));
let mut main = fs::File::create("src/sqv-usage.rs").unwrap();
dump_help(&mut main,
&mut sqv,
diff --git a/sqv/src/sqv-usage.rs b/sqv/src/sqv-usage.rs
index 589d9a96..1838d6cd 100644
--- a/sqv/src/sqv-usage.rs
+++ b/sqv/src/sqv-usage.rs
@@ -15,20 +15,25 @@
//!
//! OPTIONS:
//! --keyring <FILE>... A keyring. Can be given multiple times.
-//! --not-after <TIMESTAMP> Consider signatures created after TIMESTAMP as invalid. If a date is given,
-//! 23:59:59 is used for the time.
-//! [default: now]
-//! --not-before <TIMESTAMP> Consider signatures created before TIMESTAMP as invalid. If a date is given,
-//! 00:00:00 is used for the time.
-//! [default: no constraint]
-//! -n, --signatures <N> The number of valid signatures to return success. Default: 1
+//! --not-after <TIMESTAMP>
+//! Consider signatures created after TIMESTAMP as invalid. If a date
+//! is given, 23:59:59 is used for the time.
+//! [default: now]
+//! --not-before <TIMESTAMP>
+//! Consider signatures created before TIMESTAMP as invalid. If a date
+//! is given, 00:00:00 is used for the time.
+//! [default: no constraint]
+//! -n, --signatures <N>
+//! The number of valid signatures to return success. Default: 1
+//!
//!
//! ARGS:
//! <SIG-FILE> File containing the detached signature.
//! <FILE> File to verify.
//!
-//! TIMESTAMPs must be given in ISO 8601 format (e.g. '2017-03-04T13:25:35Z', '2017-03-04T13:25', '20170304T1325+0830',
-//! '2017-03-04', '2017031', ...). If no timezone is specified, UTC is assumed.
+//! TIMESTAMPs must be given in ISO 8601 format (e.g. '2017-03-04T13:25:35Z', '2017-
+//! 03-04T13:25', '20170304T1325+0830', '2017-03-04', '2017031', ...). If no
+//! timezone is specified, UTC is assumed.
//! ```
#![doc(html_favicon_url = "https://docs.sequoia-pgp.org/favicon.png")]
diff --git a/sqv/src/sqv_cli.rs b/sqv/src/sqv_cli.rs
index 8b85dc92..1391924f 100644
--- a/sqv/src/sqv_cli.rs
+++ b/sqv/src/sqv_cli.rs
@@ -4,7 +4,11 @@ use clap::{App, Arg, AppSettings};
// The argument parser.
pub fn build() -> App<'static, 'static> {
- App::new("sqv")
+ configure(App::new("sqv"))
+}
+
+pub fn configure(app: App<'static, 'static>) -> App<'static, 'static> {
+ app
.version(env!("CARGO_PKG_VERSION"))
.about("sqv is a command-line OpenPGP signature verification tool.")
.setting(AppSettings::ArgRequiredElseHelp)