mirror of
https://github.com/sharkdp/bat.git
synced 2024-11-22 15:53:29 +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