4 releases

Uses old Rust 2015

0.2.0 Feb 2, 2024
0.1.2 Jul 9, 2022
0.1.1 Jul 7, 2022
0.1.0 Jul 7, 2022

#16 in #read-input

Download history 8/week @ 2024-07-22 1/week @ 2024-09-16 21/week @ 2024-09-23 15/week @ 2024-09-30

71 downloads per month
Used in 2 crates

MIT/Apache

3KB

read_pipe

Simple Rust crate to read pipes from stdin.

Usage

if let Some(pipe) = read_pipe::read_pipe() {
    println!("User has piped \"{pipe}\" to the program.")
}

Examples


Input:

echo "Really interesting pipe" | cargo run

Output:

Some("Really interesting pipe")

Input:

cargo run

Output:

None

No runtime deps