mirror of
https://github.com/ouch-org/ouch.git
synced 2025-07-18 23:50:35 +00:00
Merge 8227082ac55108ee743280ddce1b74267c605f67 into bbce74666682aa26f62fe0cc980b196257f846fb
This commit is contained in:
commit
1e132cb0d6
@ -41,6 +41,7 @@ Categories Used:
|
||||
### Tweaks
|
||||
|
||||
- Make `.bz3` opt-out [\#814](https://github.com/ouch-org/ouch/pull/814) ([amyspark](https://github.com/amyspark))
|
||||
- Add alias `--concurrency` to `--threads` flag (then swap alias with original) [\#848](https://github.com/ouch-org/ouch/pull/848) ([marcospb19](https://github.com/marcospb19))
|
||||
|
||||
## [0.6.1](https://github.com/ouch-org/ouch/compare/0.6.0...0.6.1)
|
||||
|
||||
|
@ -45,9 +45,9 @@ pub struct CliArgs {
|
||||
#[arg(short, long = "password", aliases = ["pass", "pw"], global = true)]
|
||||
pub password: Option<OsString>,
|
||||
|
||||
/// Concurrent working threads
|
||||
#[arg(short = 'c', long, global = true)]
|
||||
pub threads: Option<usize>,
|
||||
/// Limit the amount of concurrent threads available
|
||||
#[arg(short, long, visible_alias = "threads", global = true)]
|
||||
pub concurrency: Option<usize>,
|
||||
|
||||
// Ouch and claps subcommands
|
||||
#[command(subcommand)]
|
||||
@ -154,7 +154,7 @@ mod tests {
|
||||
format: None,
|
||||
// This is usually replaced in assertion tests
|
||||
password: None,
|
||||
threads: None,
|
||||
concurrency: None,
|
||||
cmd: Subcommand::Decompress {
|
||||
// Put a crazy value here so no test can assert it unintentionally
|
||||
files: vec!["\x00\x11\x22".into()],
|
||||
|
@ -54,7 +54,7 @@ pub fn run(
|
||||
question_policy: QuestionPolicy,
|
||||
file_visibility_policy: FileVisibilityPolicy,
|
||||
) -> crate::Result<()> {
|
||||
if let Some(threads) = args.threads {
|
||||
if let Some(threads) = args.concurrency {
|
||||
rayon::ThreadPoolBuilder::new()
|
||||
.num_threads(threads)
|
||||
.build_global()
|
||||
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
source: tests/ui.rs
|
||||
expression: "output_to_string(ouch!(\"-h\"))"
|
||||
snapshot_kind: text
|
||||
---
|
||||
A command-line utility for easily compressing and decompressing files and directories.
|
||||
|
||||
@ -14,14 +13,14 @@ Commands:
|
||||
help Print this message or the help of the given subcommand(s)
|
||||
|
||||
Options:
|
||||
-y, --yes Skip [Y/n] questions, default to yes
|
||||
-n, --no Skip [Y/n] questions, default to no
|
||||
-A, --accessible Activate accessibility mode, reducing visual noise [env: ACCESSIBLE=]
|
||||
-H, --hidden Ignore hidden files
|
||||
-q, --quiet Silence output
|
||||
-g, --gitignore Ignore files matched by git's ignore files
|
||||
-f, --format <FORMAT> Specify the format of the archive
|
||||
-p, --password <PASSWORD> Decompress or list with password
|
||||
-c, --threads <THREADS> Concurrent working threads
|
||||
-h, --help Print help (see more with '--help')
|
||||
-V, --version Print version
|
||||
-y, --yes Skip [Y/n] questions, default to yes
|
||||
-n, --no Skip [Y/n] questions, default to no
|
||||
-A, --accessible Activate accessibility mode, reducing visual noise [env: ACCESSIBLE=]
|
||||
-H, --hidden Ignore hidden files
|
||||
-q, --quiet Silence output
|
||||
-g, --gitignore Ignore files matched by git's ignore files
|
||||
-f, --format <FORMAT> Specify the format of the archive
|
||||
-p, --password <PASSWORD> Decompress or list with password
|
||||
-c, --concurrency <CONCURRENCY> Limit the amount of concurrent threads available [aliases: threads]
|
||||
-h, --help Print help (see more with '--help')
|
||||
-V, --version Print version
|
||||
|
@ -1,7 +1,6 @@
|
||||
---
|
||||
source: tests/ui.rs
|
||||
expression: "output_to_string(ouch!(\"--help\"))"
|
||||
snapshot_kind: text
|
||||
---
|
||||
A command-line utility for easily compressing and decompressing files and directories.
|
||||
|
||||
@ -44,8 +43,10 @@ Options:
|
||||
-p, --password <PASSWORD>
|
||||
Decompress or list with password
|
||||
|
||||
-c, --threads <THREADS>
|
||||
Concurrent working threads
|
||||
-c, --concurrency <CONCURRENCY>
|
||||
Limit the amount of concurrent threads available
|
||||
|
||||
[aliases: threads]
|
||||
|
||||
-h, --help
|
||||
Print help (see a summary with '-h')
|
||||
|
Loading…
x
Reference in New Issue
Block a user