diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index a25e41d2..c7b9d81d 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -82,10 +82,9 @@ impl App { Some("always") => PagingMode::Always, Some("never") => PagingMode::Never, Some("auto") | None => { - if self.matches.occurrences_of("plain") > 1 { - // If we have -pp as an option when in auto mode, the pager should be disabled. - PagingMode::Never - } else if self.matches.is_present("no-paging") { + // If we have -pp as an option when in auto mode, the pager should be disabled. + let extra_plain = self.matches.occurrences_of("plain") > 1; + if extra_plain || self.matches.is_present("no-paging") { PagingMode::Never } else if inputs.iter().any(Input::is_stdin) { // If we are reading from stdin, only enable paging if we write to an