mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-11 05:08:23 +02:00
Code formatting
This commit is contained in:
parent
57aa88a13a
commit
71b2089384
@ -104,9 +104,9 @@ pub fn build_app(interactive_output: bool) -> ClapApp<'static, 'static> {
|
|||||||
.help("Specify the name to display for a file.")
|
.help("Specify the name to display for a file.")
|
||||||
.long_help(
|
.long_help(
|
||||||
"Specify the name to display for a file. Useful when piping \
|
"Specify the name to display for a file. Useful when piping \
|
||||||
data to bat from STDIN when bat does not otherwise know \
|
data to bat from STDIN when bat does not otherwise know \
|
||||||
the filename. Note that the provided file name is also \
|
the filename. Note that the provided file name is also \
|
||||||
used for syntax detection.",
|
used for syntax detection.",
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -53,7 +53,7 @@ pub(crate) trait Printer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub struct SimplePrinter<'a> {
|
pub struct SimplePrinter<'a> {
|
||||||
config: &'a Config<'a>
|
config: &'a Config<'a>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl<'a> SimplePrinter<'a> {
|
impl<'a> SimplePrinter<'a> {
|
||||||
|
@ -92,14 +92,16 @@ impl<'a> SyntaxMapping<'a> {
|
|||||||
"*.swap",
|
"*.swap",
|
||||||
"*.target",
|
"*.target",
|
||||||
"*.timer",
|
"*.timer",
|
||||||
].iter() {
|
]
|
||||||
mapping
|
.iter()
|
||||||
.insert(glob, MappingTarget::MapTo("INI"))
|
{
|
||||||
.unwrap();
|
mapping.insert(glob, MappingTarget::MapTo("INI")).unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
// pacman hooks
|
// pacman hooks
|
||||||
mapping.insert("*.hook", MappingTarget::MapTo("INI")).unwrap();
|
mapping
|
||||||
|
.insert("*.hook", MappingTarget::MapTo("INI"))
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
mapping
|
mapping
|
||||||
}
|
}
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
use assert_cmd::Command;
|
use assert_cmd::Command;
|
||||||
use predicates::{prelude::predicate,str::PredicateStrExt};
|
use predicates::{prelude::predicate, str::PredicateStrExt};
|
||||||
use std::path::Path;
|
use std::path::Path;
|
||||||
use std::str::from_utf8;
|
use std::str::from_utf8;
|
||||||
|
|
||||||
|
@ -14,7 +14,8 @@ fn no_duplicate_extensions() {
|
|||||||
// The "Ruby Haml" syntax also comes with a '.sass' extension. However, we make sure
|
// The "Ruby Haml" syntax also comes with a '.sass' extension. However, we make sure
|
||||||
// that 'sass' is mapped to the 'Sass' syntax.
|
// that 'sass' is mapped to the 'Sass' syntax.
|
||||||
"sass",
|
"sass",
|
||||||
// The '.fs' extension appears in F# and GLSL. We default to F#.
|
// The '.fs' extension appears in F# and GLSL.
|
||||||
|
// We default to F#.
|
||||||
"fs",
|
"fs",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user