2 releases
0.1.1 | Feb 13, 2024 |
---|---|
0.1.0 | Feb 13, 2024 |
#100 in #input-output
4KB
54 lines
qshell
: Command-running macro
sh
is a macro for running external commands. It provides functionality to
pipe the input and output to variables as well as using rust expressions
as arguments to the program.
lib.rs
:
Examples
let world = "world";
let mut out = String::new();
sh!(echo hello {world} > {out});
assert_eq!(out, "hello world\n");
let world = "world";
let mut out = String::new();
sh!(echo hello {world} > {out});
assert_eq!(out, "hello world\n");
For more information, see the documentation for
[sh
].
Dependencies
~250KB