mirror of
https://github.com/sharkdp/bat.git
synced 2025-09-03 03:42:26 +01:00
Adds a little logic to main to get other mappings from config
This commit is contained in:
@@ -59,6 +59,10 @@ impl<'a> SyntaxMapping<'a> {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub fn mappings(&self) -> &Vec<(GlobMatcher, MappingTarget<'a>)> {
|
||||
&self.mappings
|
||||
}
|
||||
|
||||
pub(crate) fn get_syntax_for(&self, path: impl AsRef<Path>) -> Option<MappingTarget<'a>> {
|
||||
let candidate = Candidate::new(path.as_ref());
|
||||
let canddidate_filename = path.as_ref().file_name().map(Candidate::new);
|
||||
|
Reference in New Issue
Block a user