#shell #macro #cli #input-output

yanked qshell

Macro for easily running commands

2 releases

0.1.1 Feb 13, 2024
0.1.0 Feb 13, 2024

#52 in #input-output

MIT license

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

~190–255KB