# HG changeset patch # User Christian Brabandt # Date 1707953402 -3600 # Node ID 6b9eefad14d8b35b4c6f3d3c883258e558e6fc4c # Parent 8c94a269b44619269fd2563c9b9060025082ae34 patch 9.1.0111: filetype: no support for bats files Commit: https://github.com/vim/vim/commit/d00fb4b3a237b375de5a1f453c8453b8b3797d51 Author: Brandon Maier Date: Thu Feb 15 00:16:02 2024 +0100 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: #14039 Signed-off-by: Brandon Maier Signed-off-by: Christian Brabandt diff --git a/runtime/filetype.vim b/runtime/filetype.vim --- a/runtime/filetype.vim +++ b/runtime/filetype.vim @@ -2008,7 +2008,7 @@ au BufNewFile,BufRead catalog setf cat " Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually " bash scripts. " NOTE: Patterns ending in a star are further down, these have lower priority. -au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD call dist#ft#SetFileTypeSH("bash") +au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD,*.bats call dist#ft#SetFileTypeSH("bash") au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh") au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call dist#ft#SetFileTypeSH(getline(1)) diff --git a/src/testdir/test_filetype.vim b/src/testdir/test_filetype.vim --- a/src/testdir/test_filetype.vim +++ b/src/testdir/test_filetype.vim @@ -621,7 +621,7 @@ def s:GetFilenameChecks(): dict