mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-28 09:18:53 +01:00
Fix paging not happening when stdout is interactive but stdin is not
This commit is contained in:
parent
b420c42aff
commit
149dec6953
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user