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