mirror of
https://github.com/sharkdp/bat.git
synced 2025-01-18 12:05:52 +00:00
Numbers => LineNumbers
This commit is contained in:
parent
36dde9275a
commit
0cde4e9121
@ -9,7 +9,7 @@ fn main() {
|
||||
.style_components(&[
|
||||
StyleComponent::Header,
|
||||
StyleComponent::Grid,
|
||||
StyleComponent::Numbers,
|
||||
StyleComponent::LineNumbers,
|
||||
])
|
||||
.input_files(std::env::args_os().skip(1))
|
||||
.print()
|
||||
|
@ -277,7 +277,7 @@ impl App {
|
||||
if matches.value_of("decorations") == Some("never") {
|
||||
HashSet::new()
|
||||
} else if matches.is_present("number") {
|
||||
[StyleComponent::Numbers].iter().cloned().collect()
|
||||
[StyleComponent::LineNumbers].iter().cloned().collect()
|
||||
} else if matches.is_present("plain") {
|
||||
[StyleComponent::Plain].iter().cloned().collect()
|
||||
} else {
|
||||
|
10
src/style.rs
10
src/style.rs
@ -9,7 +9,7 @@ pub enum StyleComponent {
|
||||
Changes,
|
||||
Grid,
|
||||
Header,
|
||||
Numbers,
|
||||
LineNumbers,
|
||||
Snip,
|
||||
Full,
|
||||
Plain,
|
||||
@ -28,13 +28,13 @@ impl StyleComponent {
|
||||
StyleComponent::Changes => &[StyleComponent::Changes],
|
||||
StyleComponent::Grid => &[StyleComponent::Grid],
|
||||
StyleComponent::Header => &[StyleComponent::Header],
|
||||
StyleComponent::Numbers => &[StyleComponent::Numbers],
|
||||
StyleComponent::LineNumbers => &[StyleComponent::LineNumbers],
|
||||
StyleComponent::Snip => &[StyleComponent::Snip],
|
||||
StyleComponent::Full => &[
|
||||
StyleComponent::Changes,
|
||||
StyleComponent::Grid,
|
||||
StyleComponent::Header,
|
||||
StyleComponent::Numbers,
|
||||
StyleComponent::LineNumbers,
|
||||
StyleComponent::Snip,
|
||||
],
|
||||
StyleComponent::Plain => &[],
|
||||
@ -51,7 +51,7 @@ impl FromStr for StyleComponent {
|
||||
"changes" => Ok(StyleComponent::Changes),
|
||||
"grid" => Ok(StyleComponent::Grid),
|
||||
"header" => Ok(StyleComponent::Header),
|
||||
"numbers" => Ok(StyleComponent::Numbers),
|
||||
"numbers" => Ok(StyleComponent::LineNumbers),
|
||||
"snip" => Ok(StyleComponent::Snip),
|
||||
"full" => Ok(StyleComponent::Full),
|
||||
"plain" => Ok(StyleComponent::Plain),
|
||||
@ -82,7 +82,7 @@ impl StyleComponents {
|
||||
}
|
||||
|
||||
pub fn numbers(&self) -> bool {
|
||||
self.0.contains(&StyleComponent::Numbers)
|
||||
self.0.contains(&StyleComponent::LineNumbers)
|
||||
}
|
||||
|
||||
pub fn snip(&self) -> bool {
|
||||
|
Loading…
x
Reference in New Issue
Block a user