About
The sprint crate provides the [Shell] struct which represents a shell
session in your library or CLI code and can be used for running commands:
-
Run command(s) and show the output
- Methods
- [
run][Shell::run] - [
run_check][Shell::run_check]
- [
- Options include
shell,fence,info,prompt,print,dry_run
- Methods
-
Run command(s) and return the output
- Methods
- [
pipe][Shell::pipe] - [
pipe_with][Shell::pipe_with] - [
pipe_with1][Shell::pipe_with1]
- [
- Options include
shell,sync
- Methods
[Shell] exposes its properties so you can easily
create a custom shell or modify an existing shell with
the settings you want.
Examples
Run command(s) and show the output
use *;
let shell = default;
shell.run.unwrap;
Run command(s) and return the output
use *;
let shell = default;
assert_eq!;
Customize
use *;
let shell = Shell ;
shell.run.unwrap;
Modify
use *;
let mut shell = default;
shell.shell = None;
shell.sync = false;
let results = shell.pipe;
Changelog
- 0.1.0 (2023-12-22): Initial release