]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0773: filetype: some Apache files are not recognized v9.1.0773
authornisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
Thu, 10 Oct 2024 17:09:28 +0000 (19:09 +0200)
committerChristian Brabandt <cb@256bit.org>
Thu, 10 Oct 2024 17:09:28 +0000 (19:09 +0200)
Problem:  filetype: some Apache files are not recognized
Solution: Detect more config files from the Apache source
          distribution as filetype apache (nisbet-hubbard)

closes: #15810

Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index 4b5577acb867808478aef104ebc12a8f144f06bb..676994f78aa764e34c18837f6fa4bac498d79e0e 100644 (file)
@@ -2959,7 +2959,7 @@ au BufNewFile,BufRead */etc/proftpd/*.conf*,*/etc/proftpd/conf.*/*        call s:StarSe
 au BufNewFile,BufRead proftpd.conf*                                    call s:StarSetf('apachestyle')
 
 " More Apache config files
-au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,srm.conf*    call s:StarSetf('apache')
+au BufNewFile,BufRead access.conf*,apache.conf*,apache2.conf*,httpd.conf*,httpd-*.conf*,srm.conf*,proxy-html.conf*     call s:StarSetf('apache')
 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')
 
 " APT config file
index bd79fbb78275e27cf1feb005367e8c76d741c9c3..74167cb5fb0dc3110427f8b0542c169c194e5430 100644 (file)
@@ -96,8 +96,17 @@ def s:GetFilenameChecks(): dict<list<string>>
     ampl: ['file.run'],
     ant: ['build.xml'],
     antlr4: ['parser.g4'],
-    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'],
-    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'],
+    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', 'httpd-some.conf',
+      'httpd-some.conf-file', 'srm.conf', 'srm.conf-file', 'proxy-html.conf', 'proxy-html.conf-file', '/etc/httpd/mods-some/file',
+      '/etc/httpd/sites-some/file', '/etc/httpd/conf.file/conf'],
+    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'],
     applescript: ['file.scpt'],
     aptconf: ['apt.conf', '/.aptitude/config', 'any/.aptitude/config'],
     arch: ['.arch-inventory', '=tagging-method'],
index 37c733233ead519dca0ad0d08d4b1260d7c5fd4c..905daf90dba44f14c609c81adabbf3a92bc9791e 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    773,
 /**/
     772,
 /**/