vim-patch:9.1.0111: filetype: no support for bats files

The '*.bats' file type is for Bash Automated Testing System (BATS)
scripts. BATS scripts are Bash with a special '@test' extension but they
otherwise work with Vim's bash filetype.

See https://github.com/bats-core/bats-core

closes: vim/vim#14039

d00fb4b3a2

Co-authored-by: Brandon Maier <brandon.maier@collins.com>
This commit is contained in:
Christian Clason 2024-02-15 00:35:54 +01:00
parent d0599b0ed9
commit 0a51e7626a
2 changed files with 2 additions and 1 deletions

View File

@ -910,6 +910,7 @@ local extension = {
sed = 'sed',
sexp = 'sexplib',
bash = detect.bash,
bats = detect.bash,
ebuild = detect.bash,
eclass = detect.bash,
env = detect.sh,

View File

@ -581,7 +581,7 @@ func s:GetFilenameChecks() abort
\ 'services': ['/etc/services', 'any/etc/services'],
\ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
\ 'sexplib': ['file.sexp'],
\ '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'],
\ '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', 'file.bats'],
\ 'sieve': ['file.siv', 'file.sieve'],
\ 'sil': ['file.sil'],
\ 'simula': ['file.sim'],