Skip to content

Commit 4b77eca

Browse files
committed
Bump version to 2.0.0
1 parent 940f081 commit 4b77eca

File tree

4 files changed

+15
-23
lines changed

4 files changed

+15
-23
lines changed

Cargo.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ documentation = "https://docs.rs/cmd_lib"
88
keywords = ["shell", "script", "cli", "process", "pipe"]
99
categories = ["command-line-interface", "command-line-utilities"]
1010
readme = "README.md"
11-
version = "1.9.6"
11+
version = "2.0.0"
1212
authors = ["rust-shell-script <rust-shell-script@gmail.com>"]
1313
edition = "2024"
1414
rust-version = "1.88"
@@ -17,19 +17,19 @@ rust-version = "1.88"
1717
members = ["macros"]
1818

1919
[dependencies]
20-
cmd_lib_macros = { version = "1.9.6", path = "./macros" }
21-
log = "0.4.20"
20+
cmd_lib_macros = { version = "2.0.0", path = "./macros" }
21+
log = "0.4.27"
2222
faccess = "0.2.4"
23-
os_pipe = "1.1.4"
24-
env_logger = "0.10.0"
23+
os_pipe = "1.2.2"
24+
env_logger = "0.11.8"
2525
build-print = { version = "1.0", optional = true }
2626
tracing = { version = "0.1.41", optional = true }
2727

2828
[dev-dependencies]
29-
rayon = "1.8.0"
29+
rayon = "1.11.0"
3030
clap = { version = "4", features = ["derive"] }
3131
byte-unit = "4.0.19"
32-
tracing-subscriber = { version = "0.3.19", features = ["env-filter"] }
32+
tracing-subscriber = { version = "0.3.20", features = ["env-filter"] }
3333

3434
[features]
3535
build-print = ["dep:build-print"]

README.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,7 @@ run_cmd! {
105105

106106
```rust
107107
let version = run_fun!(rustc --version | awk r"{print $2}")?;
108-
eprintln!("Your rust version is {}", version);
109-
110-
// with pipes
111-
let n = run_fun!(echo "the quick brown fox jumped over the lazy dog" | wc -w)?;
112-
eprintln!("There are {} words in above sentence", n);
108+
info!("Your rust version is {version}");
113109
```
114110

115111
#### Abstraction without overhead

macros/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ license = "MIT OR Apache-2.0"
55
homepage = "https://github.com/rust-shell-script/rust_cmd_lib"
66
repository = "https://github.com/rust-shell-script/rust_cmd_lib"
77
keywords = ["shell", "script", "cli", "process", "pipe"]
8-
version = "1.9.6"
8+
version = "2.0.0"
99
authors = ["Tao Guo <tao.guo.code@gmail.com>"]
1010
edition = "2024"
1111
rust-version = "1.88"

src/lib.rs

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,10 @@
112112
//!
113113
//! - [`run_fun!`](https://docs.rs/cmd_lib/latest/cmd_lib/macro.run_fun.html) -> [`FunResult`](https://docs.rs/cmd_lib/latest/cmd_lib/type.FunResult.html)
114114
//!
115-
//! ```
116-
//! # use cmd_lib::run_fun;
115+
//! ```no_run
116+
//! # use cmd_lib::{info, run_fun};
117117
//! let version = run_fun!(rustc --version | awk r"{print $2}")?;
118-
//! eprintln!("Your rust version is {}", version);
119-
//!
120-
//! // with pipes
121-
//! let n = run_fun!(echo "the quick brown fox jumped over the lazy dog" | wc -w)?;
122-
//! eprintln!("There are {} words in above sentence", n);
118+
//! info!("Your rust version is {version}");
123119
//! # Ok::<(), std::io::Error>(())
124120
//! ```
125121
//!
@@ -293,7 +289,7 @@
293289
//! ### Macro to register your own commands
294290
//! Declare your function with the right signature, and register it with [`use_custom_cmd!`](https://docs.rs/cmd_lib/latest/cmd_lib/macro.use_custom_cmd.html) macro:
295291
//!
296-
//! ```
292+
//! ```no_run
297293
//! # use cmd_lib::*;
298294
//! # use std::io::Write;
299295
//! fn my_cmd(env: &mut CmdEnv) -> CmdResult {
@@ -317,7 +313,7 @@
317313
//! - [`tls_init!`](https://docs.rs/cmd_lib/latest/cmd_lib/macro.tls_init.html) to define thread local global variable
318314
//! - [`tls_get!`](https://docs.rs/cmd_lib/latest/cmd_lib/macro.tls_get.html) to get the value
319315
//! - [`tls_set!`](https://docs.rs/cmd_lib/latest/cmd_lib/macro.tls_set.html) to set the value
320-
//! ```
316+
//! ```no_run
321317
//! # use cmd_lib::{ tls_init, tls_get, tls_set };
322318
//! tls_init!(DELAY, f64, 1.0);
323319
//! const DELAY_FACTOR: f64 = 0.8;
@@ -347,7 +343,7 @@
347343
//! ### Security Notes
348344
//! Using macros can actually avoid command injection, since we do parsing before variable substitution.
349345
//! For example, below code is fine even without any quotes:
350-
//! ```
346+
//! ```no_run
351347
//! # use cmd_lib::{run_cmd, CmdResult};
352348
//! # use std::path::Path;
353349
//! fn cleanup_uploaded_file(file: &Path) -> CmdResult {

0 commit comments

Comments
 (0)