Change sq packet split to write to stdout by default.
- Change `sq packet split` to not require `output` or `prefix`, but to write to `stdout` by default. - This is closer to the behavior of other commands.
This commit is contained in:
parent
fdc963cd59
commit
2ba6037362
1
NEWS
1
NEWS
@ -105,6 +105,7 @@
|
||||
those that emit signed and or encrypted messages.
|
||||
- The command `sq toolbox extract-cert` has been removed in favor
|
||||
of `sq key delete` and `sq key subkey delete`.
|
||||
- The command `sq packet split` now writes to stdout by default.
|
||||
|
||||
* Changes in 0.39.0
|
||||
** Notable changes
|
||||
|
@ -5,7 +5,7 @@ use std::{
|
||||
path::PathBuf,
|
||||
};
|
||||
|
||||
use clap::{ArgGroup, Args, Parser, Subcommand};
|
||||
use clap::{Args, Parser, Subcommand};
|
||||
|
||||
use crate::cli::examples::*;
|
||||
use crate::cli::types::ArmorKind;
|
||||
@ -263,7 +263,6 @@ The converse operation is `sq packet join`.
|
||||
",
|
||||
after_help = SPLIT_EXAMPLES,
|
||||
)]
|
||||
#[clap(group(ArgGroup::new("sink").args(&["output", "prefix"]).required(true)))]
|
||||
pub struct SplitCommand {
|
||||
#[clap(
|
||||
default_value_t = FileOrStdin::default(),
|
||||
|
@ -134,8 +134,8 @@ pub fn split(sq: Sq, c: SplitCommand) -> Result<()>
|
||||
let mut sink = match c.prefix {
|
||||
Some(p) => Err(p),
|
||||
None => Ok(
|
||||
c.output.as_ref()
|
||||
.expect("either prefix or output must be given")
|
||||
c.output
|
||||
.unwrap_or_default()
|
||||
.create_pgp_safe(&sq, true, Kind::SecretKey)?),
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user