Name | Date | Size | #Lines | LOC | ||
---|---|---|---|---|---|---|
.. | 03-May-2022 | - | ||||
.vscode/ | H | 03-May-2022 | - | 6 | 5 | |
examples/ | H | 03-May-2022 | - | 112 | 91 | |
src/ | H | 03-May-2022 | - | 1,122 | 677 | |
tests/it/ | H | 03-May-2022 | - | 690 | 567 | |
.cargo-checksum.json | H A D | 03-May-2022 | 89 | 1 | 1 | |
.cargo_vcs_info.json | H A D | 04-Sep-2021 | 74 | 6 | 5 | |
.gitignore | H A D | 04-Sep-2021 | 89 | 8 | 7 | |
CHANGELOG.md | H A D | 04-Sep-2021 | 1.1 KiB | 65 | 36 | |
Cargo.lock | H A D | 04-Sep-2021 | 373 | 15 | 13 | |
Cargo.toml | H A D | 04-Sep-2021 | 968 | 25 | 23 | |
Cargo.toml.orig-cargo | H A D | 04-Sep-2021 | 546 | 17 | 13 | |
LICENSE-APACHE | H A D | 04-Sep-2021 | 10.6 KiB | 202 | 169 | |
LICENSE-MIT | H A D | 04-Sep-2021 | 1,023 | 24 | 21 | |
README.md | H A D | 04-Sep-2021 | 485 | 20 | 14 |
README.md
1# xshell: Making Rust a Better Bash 2 3`xshell` provides a set of cross-platform utilities for writing ergonomic "bash" scripts. 4 5```rust 6use xshell::{cmd, read_file}; 7 8let name = "Julia"; 9let output = cmd!("echo hello {name}!").read()?; 10assert_eq!(output, "hello Julia!"); 11 12let err = read_file("feeling-lucky.txt").unwrap_err(); 13assert_eq!( 14 err.to_string(), 15 "`feeling-lucky.txt`: no such file or directory (os error 2)", 16); 17``` 18 19See [the docs](https://docs.rs/xshell) for more. 20