Merge pull request #24082 from smjonas/fix_24064

fix(filetype): correctly detect bash-fc-{id} files as "sh" (vim-patch:9.0.1644)
This commit is contained in:
Christian Clason 2023-06-24 13:41:50 +02:00 committed by GitHub
commit c2d696f009
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -2189,7 +2189,7 @@ local pattern = {
['.*/etc/profile'] = function(path, bufnr)
return require('vim.filetype.detect').sh(path, M.getlines(bufnr))
end,
['bash%-fc[%-%.]'] = function(path, bufnr)
['bash%-fc[%-%.].*'] = function(path, bufnr)
return require('vim.filetype.detect').sh(path, M.getlines(bufnr), 'bash')
end,
['%.tcshrc.*'] = function(path, bufnr)

View File

@ -535,7 +535,7 @@ let s:filename_checks = {
\ 'services': ['/etc/services', 'any/etc/services'],
\ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
\ 'sexplib': ['file.sexp'],
\ 'sh': ['.bashrc', 'file.bash', '/usr/share/doc/bash-completion/filter.sh','/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
\ 'sh': ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh', '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
\ 'sieve': ['file.siv', 'file.sieve'],
\ 'sil': ['file.sil'],
\ 'simula': ['file.sim'],