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

#885 in Unix APIs

Download history 122/week @ 2024-07-22 132/week @ 2024-07-29 175/week @ 2024-08-05 154/week @ 2024-08-12 84/week @ 2024-08-19 184/week @ 2024-08-26 221/week @ 2024-09-02 288/week @ 2024-09-09 182/week @ 2024-09-16 269/week @ 2024-09-23 288/week @ 2024-09-30 240/week @ 2024-10-07 267/week @ 2024-10-14 72/week @ 2024-10-21 96/week @ 2024-10-28 75/week @ 2024-11-04

544 downloads per month
Used in 2 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