on master help sign in
Change to name no-paging, add long flag and alias
commit5fdeeabb444c3c23e9785c13b79768c54c97c57d authorDash Peters <dpeters@calacademy.org> dateWed 1 Jul 2020, 21:35 (6 years ago) parentb0d1975
2 files changed+5−3
src/bin/bat/app.rs+1−1 src/bin/bat/clap_app.rs+4−2
src/bin/bat/app.rs+1−1
@@ -85,7 +85,7 @@ impl App {
8585 if self.matches.occurrences_of("plain") > 1 {
8686 // If we have -pp as an option when in auto mode, the pager should be disabled.
8787 PagingMode::Never
88− } else if self.matches.is_present("disable-paging") {
88+ } else if self.matches.is_present("no-paging") {
8989 PagingMode::Never
9090 } else if inputs.iter().any(Input::is_stdin) {
9191 // If we are reading from stdin, only enable paging if we write to an
src/bin/bat/clap_app.rs+4−2
@@ -276,9 +276,11 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
276276 ),
277277 )
278278 .arg(
279− Arg::with_name("disable-paging")
279+ Arg::with_name("no-paging")
280280 .short("P")
281− .overrides_with("disable-paging")
281+ .long("no-paging")
282+ .alias("no-pager")
283+ .overrides_with("no-paging")
282284 .help("Alias for --paging=never")
283285 )
284286 .arg(