1
0
mirror of https://github.com/sharkdp/bat.git synced 2025-09-01 19:02:22 +01:00

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
2018-08-23 23:13:24 +02:00
parent 246cf79dbd
commit 226d9a573a
4 changed files with 97 additions and 31 deletions

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