mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
Adds a little logic to main to get other mappings from config
This commit is contained in:
1 parent
92e93682c6
commit
48b4a6a906
2 files changed
+36
-1
No files matched your search
@@ -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