mirror of
https://github.com/sharkdp/bat
synced 2026-07-26 17:31:42 +00: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