diff options
author | Neal H. Walfield <neal@pep.foundation> | 2021-01-22 10:26:58 +0100 |
---|---|---|
committer | Neal H. Walfield <neal@pep.foundation> | 2021-01-22 10:32:02 +0100 |
commit | 1eee13d7035718eddc1163d7e0432299aee15ffe (patch) | |
tree | 669639875405b7307f71795a18cc50f0c3fc2e24 | |
parent | a7a35e6ba322d42280930af5e00eebf63f3f9b37 (diff) |
sq: If sq keyring filter is not passed any filters match everything.
-rw-r--r-- | sq/src/commands/keyring.rs | 3 | ||||
-rw-r--r-- | sq/src/sq-usage.rs | 2 | ||||
-rw-r--r-- | sq/src/sq_cli.rs | 4 |
3 files changed, 7 insertions, 2 deletions
diff --git a/sq/src/commands/keyring.rs b/sq/src/commands/keyring.rs index 0c808628..a7650907 100644 --- a/sq/src/commands/keyring.rs +++ b/sq/src/commands/keyring.rs @@ -80,7 +80,8 @@ pub fn dispatch(m: &clap::ArgMatches, force: bool) -> Result<()> { if ! (c.userids().any(|c| uid_predicate(&c)) || c.user_attributes().any(|c| ua_predicate(&c)) || c.keys().subkeys().any(|c| key_predicate(&c))) { - None + // If there are no filters, pass it through. + Some(c) } else if m.is_present("prune-certs") { let c = c .retain_userids(|c| { diff --git a/sq/src/sq-usage.rs b/sq/src/sq-usage.rs index ff467d84..4d1bf4cb 100644 --- a/sq/src/sq-usage.rs +++ b/sq/src/sq-usage.rs @@ -402,6 +402,8 @@ //! //! $ cat certs.pgp | sq keyring filter --domain example.org | sq keyring filter //! --name Juliett +//! +//! If no filters are supplied, everything matches. //! ``` //! //! ### Subcommand keyring join diff --git a/sq/src/sq_cli.rs b/sq/src/sq_cli.rs index 4f769bcf..e68dfe44 100644 --- a/sq/src/sq_cli.rs +++ b/sq/src/sq_cli.rs @@ -466,7 +466,9 @@ pub fn configure(app: App<'static, 'static>) -> App<'static, 'static> { predicates to match, chain multiple \ invocations of this command:\n\ \n\ - $ cat certs.pgp | sq keyring filter --domain example.org | sq keyring filter --name Juliett") + $ cat certs.pgp | sq keyring filter --domain example.org | sq keyring filter --name Juliett\n\ + \n\ + If no filters are supplied, everything matches.") .arg(Arg::with_name("input") .value_name("FILE") .multiple(true) |