mirror of
https://github.com/sharkdp/bat.git
synced 2025-04-14 23:00:37 +01:00
Adds custom mapping for nginx and apache config files
This commit is contained in:
parent
e305402212
commit
ad18f070ae
@ -48,6 +48,31 @@ impl<'a> SyntaxMapping<'a> {
|
|||||||
.insert("rails", MappingTarget::MapToUnknown)
|
.insert("rails", MappingTarget::MapToUnknown)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
// Nginx and Apache syntax files both want to style all ".conf" files
|
||||||
|
// see #1131 and #1137
|
||||||
|
mapping
|
||||||
|
.insert("*.conf", MappingTarget::MapToUnknown)
|
||||||
|
.unwrap();
|
||||||
|
|
||||||
|
for glob in &[
|
||||||
|
"/etc/nginx/**/*.conf",
|
||||||
|
"/etc/nginx/sites-*/**/*",
|
||||||
|
"nginx.conf",
|
||||||
|
"mime.types",
|
||||||
|
] {
|
||||||
|
mapping.insert(glob, MappingTarget::MapTo("nginx")).unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
|
for glob in &[
|
||||||
|
"/etc/apache2/**/*.conf",
|
||||||
|
"/etc/apache2/sites-*/**/*",
|
||||||
|
"httpd.conf",
|
||||||
|
] {
|
||||||
|
mapping
|
||||||
|
.insert(glob, MappingTarget::MapTo("Apache Conf"))
|
||||||
|
.unwrap();
|
||||||
|
}
|
||||||
|
|
||||||
for glob in [
|
for glob in [
|
||||||
"**/systemd/**/*.conf",
|
"**/systemd/**/*.conf",
|
||||||
"**/systemd/**/*.example",
|
"**/systemd/**/*.example",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user