From 149dec695376da3a74da10ee1201e1f50a245655 Mon Sep 17 00:00:00 2001 From: Nigecat Date: Mon, 22 May 2023 11:10:12 +1000 Subject: [PATCH] Fix paging not happening when stdout is interactive but stdin is not --- src/bin/bat/app.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index f7f4c4af..fc84e2a3 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -104,7 +104,7 @@ impl App { // If we are reading from stdin, only enable paging if we write to an // interactive terminal and if we do not *read* from an interactive // terminal. - if self.interactive_output && std::io::stdin().is_terminal() { + if self.interactive_output && !std::io::stdin().is_terminal() { PagingMode::QuitIfOneScreen } else { PagingMode::Never