Add simple loop-through mode

Use a loop-through mode that simply copies input to output if a
non-interactive terminal is detected.

see #150
This commit is contained in:
sharkdp committed 2018-08-23 23:13:24 +02:00
1 parent 246cf79dbd
commit 226d9a573a
4 files changed
+97 -31

No files matched your search

+5 -2
View File
@@ -41,8 +41,11 @@ impl BatTester {
pub fn test_snapshot(&self, style: &str) {
let output = Command::new(&self.exe)
.current_dir(self.temp_dir.path())
.args(&["sample.rs", &format!("--style={}", style)])
.output()
.args(&[
"sample.rs",
"--decorations=always",
&format!("--style={}", style),
]).output()
.expect("bat failed");
// have to do the replace because the filename in the header changes based on the current working directory