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