mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-31 18:21:04 +00:00
Change to name no-paging, add long flag and alias
This commit is contained in:
parent
b0d19752c6
commit
5fdeeabb44
@ -85,7 +85,7 @@ impl App {
|
|||||||
if self.matches.occurrences_of("plain") > 1 {
|
if self.matches.occurrences_of("plain") > 1 {
|
||||||
// If we have -pp as an option when in auto mode, the pager should be disabled.
|
// If we have -pp as an option when in auto mode, the pager should be disabled.
|
||||||
PagingMode::Never
|
PagingMode::Never
|
||||||
} else if self.matches.is_present("disable-paging") {
|
} else if self.matches.is_present("no-paging") {
|
||||||
PagingMode::Never
|
PagingMode::Never
|
||||||
} else if inputs.iter().any(Input::is_stdin) {
|
} else if inputs.iter().any(Input::is_stdin) {
|
||||||
// If we are reading from stdin, only enable paging if we write to an
|
// If we are reading from stdin, only enable paging if we write to an
|
||||||
|
@ -276,9 +276,11 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
),
|
),
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
Arg::with_name("disable-paging")
|
Arg::with_name("no-paging")
|
||||||
.short("P")
|
.short("P")
|
||||||
.overrides_with("disable-paging")
|
.long("no-paging")
|
||||||
|
.alias("no-pager")
|
||||||
|
.overrides_with("no-paging")
|
||||||
.help("Alias for --paging=never")
|
.help("Alias for --paging=never")
|
||||||
)
|
)
|
||||||
.arg(
|
.arg(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user