Zdenek Dohnal 3d7b0a
From c669d497d34e4b57f40c19d58e3703401075a6d5 Mon Sep 17 00:00:00 2001
Zdenek Dohnal 3d7b0a
From: Zdenek Dohnal <zdohnal@redhat.com>
Zdenek Dohnal 3d7b0a
Date: Fri, 17 Sep 2021 07:54:56 +0200
Zdenek Dohnal 3d7b0a
Subject: [PATCH] runtime/filetype.vim: Register more httpd files as apache
Zdenek Dohnal 3d7b0a
 filetype
Zdenek Dohnal 3d7b0a
Zdenek Dohnal 3d7b0a
Several files under /etc/httpd wasn't recognized as 'apache' filetype -
Zdenek Dohnal 3d7b0a
add them to filetype.vim and add tests for checking if recognizition
Zdenek Dohnal 3d7b0a
works.
Zdenek Dohnal 3d7b0a
---
Zdenek Dohnal 3d7b0a
 runtime/filetype.vim          | 2 +-
Zdenek Dohnal 3d7b0a
 src/testdir/test_filetype.vim | 2 +-
Zdenek Dohnal 3d7b0a
 2 files changed, 2 insertions(+), 2 deletions(-)
Zdenek Dohnal 3d7b0a
Zdenek Dohnal 3d7b0a
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
Zdenek Dohnal 3d7b0a
index d0d40539d..39a772740 100644
Zdenek Dohnal 3d7b0a
--- a/runtime/filetype.vim
Zdenek Dohnal 3d7b0a
+++ b/runtime/filetype.vim
Zdenek Dohnal 3d7b0a
@@ -2138,7 +2138,7 @@ au BufNewFile,BufRead proftpd.conf*					call s:StarSetf('apachestyle')
Karsten Hopp 80fa3a
 
Karsten Hopp 80fa3a
 " More Apache config files
Karsten Hopp 80fa3a
 au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf*	call s:StarSetf('apache')
Karsten Hopp 80fa3a
-au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.d/*.conf*		call s:StarSetf('apache')
Zdenek Dohnal 3d7b0a
+au BufNewFile,BufRead */etc/apache2/*.conf*,*/etc/apache2/conf.*/*,*/etc/apache2/mods-*/*,*/etc/apache2/sites-*/*,*/etc/httpd/conf.*/*,*/etc/httpd/mods-*/*,*/etc/httpd/sites-*/*,*/etc/httpd/conf.d/*.conf*		call s:StarSetf('apache')
Karsten Hopp 80fa3a
 
Karsten Hopp 80fa3a
 " Asterisk config file
Karsten Hopp 80fa3a
 au BufNewFile,BufRead *asterisk/*.conf*		call s:StarSetf('asterisk')
Zdenek Dohnal 3d7b0a
diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim
Zdenek Dohnal 3d7b0a
index cd6e71d1b..f1404808f 100644
Zdenek Dohnal 3d7b0a
--- a/src/testdir/test_filetype.vim
Zdenek Dohnal 3d7b0a
+++ b/src/testdir/test_filetype.vim
Zdenek Dohnal 3d7b0a
@@ -59,7 +59,7 @@ let s:filename_checks = {
Zdenek Dohnal 3d7b0a
     \ 'aml': ['file.aml'],
Zdenek Dohnal 3d7b0a
     \ 'ampl': ['file.run'],
Zdenek Dohnal 3d7b0a
     \ 'ant': ['build.xml'],
Zdenek Dohnal 3d7b0a
-    \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file'],
Zdenek Dohnal 3d7b0a
+    \ 'apache': ['.htaccess', '/etc/httpd/file.conf', '/etc/apache2/sites-2/file.com', '/etc/apache2/some.config', '/etc/apache2/conf.file/conf', '/etc/apache2/mods-some/file', '/etc/apache2/sites-some/file', '/etc/httpd/conf.d/file.config', '/etc/apache2/conf.file/file', '/etc/apache2/file.conf', '/etc/apache2/file.conf-file', '/etc/apache2/mods-file/file', '/etc/apache2/sites-file/file', '/etc/apache2/sites-file/file.com', '/etc/httpd/conf.d/file.conf', '/etc/httpd/conf.d/file.conf-file', 'access.conf', 'access.conf-file', 'any/etc/apache2/conf.file/file', 'any/etc/apache2/file.conf', 'any/etc/apache2/file.conf-file', 'any/etc/apache2/mods-file/file', 'any/etc/apache2/sites-file/file', 'any/etc/apache2/sites-file/file.com', 'any/etc/httpd/conf.d/file.conf', 'any/etc/httpd/conf.d/file.conf-file', 'any/etc/httpd/file.conf', 'apache.conf', 'apache.conf-file', 'apache2.conf', 'apache2.conf-file', 'httpd.conf', 'httpd.conf-file', 'srm.conf', 'srm.conf-file', '/etc/httpd/mods-some/file', '/etc/httpd/sites-some/file', '/etc/httpd/conf.file/conf'],
Zdenek Dohnal 3d7b0a
     \ 'apachestyle': ['/etc/proftpd/file.config,/etc/proftpd/conf.file/file', '/etc/proftpd/conf.file/file', '/etc/proftpd/file.conf', '/etc/proftpd/file.conf-file', 'any/etc/proftpd/conf.file/file', 'any/etc/proftpd/file.conf', 'any/etc/proftpd/file.conf-file', 'proftpd.conf', 'proftpd.conf-file'],
Zdenek Dohnal 3d7b0a
     \ 'applescript': ['file.scpt'],
Zdenek Dohnal 3d7b0a
     \ 'aptconf': ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
Zdenek Dohnal 3d7b0a
-- 
Zdenek Dohnal 3d7b0a
2.31.1
Zdenek Dohnal 3d7b0a