An open API service indexing awesome lists of open source software.

https://github.com/lyonsyonii/read-pipe

Small crate to read terminal pipes.
https://github.com/lyonsyonii/read-pipe

Last synced: 6 months ago
JSON representation

Small crate to read terminal pipes.

Awesome Lists containing this project

README

          

# read-pipe
Simple Rust crate to read pipes from stdin.

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

## Examples
---
Input:
```bash
echo "Really interesting pipe" | cargo run
```
Output:
```
Some("Really interesting pipe")
```
---
Input:
```bash
cargo run
```
Output:
```
None
```
---