Skip to content

Commit d475ccd

Browse files
committed
Update documents
1 parent b7f06db commit d475ccd

File tree

3 files changed

+11
-12
lines changed

3 files changed

+11
-12
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ documentation = "https://docs.rs/cmd_lib"
88
keywords = ["shell", "scripts", "commandline", "subprocess", "pipeline"]
99
categories = ["command-line-interface", "command-line-utilities"]
1010
readme = "README.md"
11-
version = "0.7.7"
11+
version = "0.7.8"
1212
authors = ["rust-shell-script <rust-shell-script@gmail.com>"]
1313
edition = "2018"
1414

README.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
# cmd_lib - Rust command line library
1+
# Command-line library for writing rust style shell scripts
22

3-
Common rust command line macros and utils, to write shell script like tasks
3+
Common rust command-line macros and utilities, to write shell-script like tasks
44
easily in rust programming language.
5-
Available at [cargo](https://crates.io/crates/cmd_lib).
6-
5+
Available at [crates.io](https://crates.io/crates/cmd_lib).
76

87
## run_cmd! --> CmdResult
98
```rust
@@ -66,8 +65,8 @@ cd: set procecess current directory
6665

6766
```rust
6867
run_cmd! {
69-
cd /tmp
70-
ls | wc -l
68+
cd /tmp;
69+
ls | wc -l;
7170
};
7271
run_cmd!("pwd");
7372
```
@@ -79,8 +78,8 @@ lcd: set group commands current directory
7978

8079
```rust
8180
run_cmd! {
82-
lcd /tmp
83-
ls | wc -l
81+
lcd /tmp;
82+
ls | wc -l;
8483
};
8584
run_cmd!("pwd");
8685
```

src/lib.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,11 @@ macro_rules! macro_str {
141141
/// ## run_fun! --> FunResult
142142
/// ```rust
143143
/// let version = run_fun!("rustc --version")?;
144-
/// info!("Your rust version is {}", version.trim());
144+
/// info!("Your rust version is {}", version);
145145
///
146146
/// // with pipes
147147
/// let n = run_fun!("echo the quick brown fox jumped over the lazy dog | wc -w")?;
148-
/// info!("There are {} words in above sentence", n.trim());
148+
/// info!("There are {} words in above sentence", n);
149149
///
150150
/// // without string quotes
151151
/// let files = run_fun!(du -ah . | sort -hr | head -n 10)?;
@@ -210,7 +210,7 @@ pub trait ProcessResult {
210210
}
211211

212212
///
213-
/// Low level process API, std::process::Child wrapper
213+
/// Low level process API, wrapper on std::process module
214214
///
215215
/// Pipe command could also lauched in builder style
216216
/// ```rust

0 commit comments

Comments
 (0)