diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index 432b8c57..4793c4fb 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -85,6 +85,8 @@ impl App { 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("disable-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 // interactive terminal and if we do not *read* from an interactive diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs index 4182b76e..b7c371fe 100644 --- a/src/bin/bat/clap_app.rs +++ b/src/bin/bat/clap_app.rs @@ -275,6 +275,12 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> { Possible values: *auto*, never, always.", ), ) + .arg( + Arg::with_name("disable-paging") + .short("P") + .overrides_with("disable-paging") + .help("Alias for --paging=never") + ) .arg( Arg::with_name("pager") .long("pager")