mirror of
https://github.com/sharkdp/bat.git
synced 2024-12-21 14:00:40 +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 \
|
||||
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::with_name("number")
|
||||
.long("number")
|
||||
@ -384,6 +394,8 @@ impl App {
|
||||
HashSet::new()
|
||||
} else if matches.is_present("number") {
|
||||
[OutputComponent::Numbers].iter().cloned().collect()
|
||||
} else if matches.is_present("plain") {
|
||||
[OutputComponent::Plain].iter().cloned().collect()
|
||||
} else {
|
||||
values_t!(matches.values_of("style"), OutputComponent)?
|
||||
.into_iter()
|
||||
|
Loading…
Reference in New Issue
Block a user