cli_runner

Crates.iocli_runner
lib.rscli_runner
version0.2.1
sourcesrc
created_at2023-01-04 15:34:02.432863
updated_at2023-01-04 15:51:34.295766
descriptionCLI runner library for Rust - run a full command line String
homepage
repositoryhttps://github.com/alensiljak/cli_runner
max_upload_size
id750904
size41,413
Alen Šiljak (alensiljak)

documentation

README

CLI Runner

CLI runner library for Rust - run a full command line String

This 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

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

License

See License

Commit count: 7

cargo fmt