mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-21 22:10:45 +01:00
#212 : added -p as an alias for --style=plain
This commit is contained in:
parent
627181bcb6
commit
81771432fb
12
src/app.rs
12
src/app.rs
@ -170,6 +170,16 @@ impl App {
|
|||||||
components to display (e.g. 'numbers,changes,grid') or a \
|
components to display (e.g. 'numbers,changes,grid') or a \
|
||||||
pre-defined style ('full')",
|
pre-defined style ('full')",
|
||||||
),
|
),
|
||||||
|
).arg(
|
||||||
|
Arg::with_name("plain")
|
||||||
|
.overrides_with("plain")
|
||||||
|
.short("p")
|
||||||
|
.conflicts_with("style")
|
||||||
|
.help("Show plain style (alias for '--style=plain').")
|
||||||
|
.long_help(
|
||||||
|
"Only show plain style, no decorations. This is an alias for \
|
||||||
|
'--style=plain'",
|
||||||
|
),
|
||||||
).arg(
|
).arg(
|
||||||
Arg::with_name("number")
|
Arg::with_name("number")
|
||||||
.long("number")
|
.long("number")
|
||||||
@ -384,6 +394,8 @@ impl App {
|
|||||||
HashSet::new()
|
HashSet::new()
|
||||||
} else if matches.is_present("number") {
|
} else if matches.is_present("number") {
|
||||||
[OutputComponent::Numbers].iter().cloned().collect()
|
[OutputComponent::Numbers].iter().cloned().collect()
|
||||||
|
} else if matches.is_present("plain") {
|
||||||
|
[OutputComponent::Plain].iter().cloned().collect()
|
||||||
} else {
|
} else {
|
||||||
values_t!(matches.values_of("style"), OutputComponent)?
|
values_t!(matches.values_of("style"), OutputComponent)?
|
||||||
.into_iter()
|
.into_iter()
|
||||||
|
Loading…
Reference in New Issue
Block a user