calm_io 0.1.1

Calms a panicky I/O stream.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//! Reimplementation of `yes(1)`, that panics on `SIGPIPE`.

fn main() {
	let mut text = std::env::args()
		.skip(1)
		.collect::<Vec<_>>()
		.join(" ");
	if text.trim().is_empty() {
		text = "y".to_owned();
	}
	loop {
		println!("{}", text);
	}
}