diff options
author | Dash Peters <dpeters@calacademy.org> | 2020-07-01 21:35:45 -0700 |
---|---|---|
committer | Dash Peters <dpeters@calacademy.org> | 2020-07-01 21:35:45 -0700 |
commit | 5fdeeabb444c3c23e9785c13b79768c54c97c57d (patch) | |
tree | 60ab45c47c1cbd38b6a31999bd2ef51577db0159 /src | |
parent | b0d19752c659170e7f9a4ab681803dbe7b5cdddd (diff) |
Change to name no-paging, add long flag and alias
Diffstat (limited to 'src')
-rw-r--r-- | src/bin/bat/app.rs | 2 | ||||
-rw-r--r-- | src/bin/bat/clap_app.rs | 6 |
2 files changed, 5 insertions, 3 deletions
diff --git a/src/bin/bat/app.rs b/src/bin/bat/app.rs index 4793c4fb..6c61215e 100644 --- a/src/bin/bat/app.rs +++ b/src/bin/bat/app.rs @@ -85,7 +85,7 @@ 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") { + } else if 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 diff --git a/src/bin/bat/clap_app.rs b/src/bin/bat/clap_app.rs index b7c371fe..f249321e 100644 --- a/src/bin/bat/clap_app.rs +++ b/src/bin/bat/clap_app.rs @@ -276,9 +276,11 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> { ), ) .arg( - Arg::with_name("disable-paging") + Arg::with_name("no-paging") .short("P") - .overrides_with("disable-paging") + .long("no-paging") + .alias("no-pager") + .overrides_with("no-paging") .help("Alias for --paging=never") ) .arg( |