Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/alensiljak/cli_runner
CLI runner library for Rust - run a full command line String
https://github.com/alensiljak/cli_runner
cli rust-library
Last synced: 2 months ago
JSON representation
CLI runner library for Rust - run a full command line String
- Host: GitHub
- URL: https://github.com/alensiljak/cli_runner
- Owner: alensiljak
- License: gpl-3.0
- Created: 2023-01-04T15:15:43.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-04T15:59:25.000Z (about 2 years ago)
- Last Synced: 2024-04-25T07:44:34.421Z (9 months ago)
- Topics: cli, rust-library
- Language: Rust
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# CLI Runner
CLI runner library for Rust - run a full command line StringThis is a library which makes it convenient to execute a command line String.
It is using shell_words crate to parse the command line, allowing it to accept a command as it would be issued in a shell.
This is a multi-platform library.
# Example
```rust
use cli_runner::{run, get_stdout, get_stderr};let cmd = "ls -alF";
let output = run(cmd);assert!(output.status.success());
let so = get_stdout(&output);
assert!(!so.is_empty());let se = get_stderr(&output);
assert!(se.is_empty());
```# Changes
See [Changelog](CHANGELOG.md)
# License
See [License](LICENSE)