4 releases

Uses old Rust 2015

0.2.0 Apr 6, 2016
0.1.2 Mar 15, 2016
0.1.1 Mar 15, 2016
0.1.0 Mar 15, 2016

#1114 in Unix APIs

Download history 7/week @ 2024-12-21 5/week @ 2024-12-28 49/week @ 2025-01-04 139/week @ 2025-01-11 91/week @ 2025-01-18 66/week @ 2025-01-25 52/week @ 2025-02-01 97/week @ 2025-02-08 83/week @ 2025-02-15 138/week @ 2025-02-22 171/week @ 2025-03-01 197/week @ 2025-03-08 200/week @ 2025-03-15 151/week @ 2025-03-22 85/week @ 2025-03-29 51/week @ 2025-04-05

528 downloads per month
Used in 3 crates

MPL-2.0 license

12KB
243 lines

Shells for Rust

Wrapper around std::process::Command which make the use of Rust for shell scripting more appealing.

License: MPL 2.0 Travis Build Status

Documentation

http://proksima.github.io/shells-doc/shells/index.html

Simple example

#[macro_use]
extern crate shells;

fn main() {
    let (code, stdout, stderr) = sh!("echo '{} + {}' | bc", 1, 3);

    assert_eq!(code, 0);
    assert_eq!(&stdout[..], "4\n");
    assert_eq!(&stderr[..], "");
}

A mnemotechnic to remember the ordering of the elements in the resulting tuple is the positions of stdout and stderr, they correspond to the standard streams numbers: 1 and 2 respectively.

If I a missing your favorite (at least partially) POSIX-compliant shell, submit a pull request!

No runtime deps