patch 9.1.0111: filetype: no support for bats files
Commit:
https://github.com/vim/vim/commit/d00fb4b3a237b375de5a1f453c8453b8b3797d51
Author: Brandon Maier <[email protected]>
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 <[email protected]>
Signed-off-by: Christian Brabandt <[email protected]>
diff --git a/runtime/filetype.vim b/runtime/filetype.vim
index 5ae632be9..aa8f4da77 100644
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -2008,7 +2008,7 @@ au BufNewFile,BufRead catalog setf
catalog
" 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
index f13c99dac..2a9ca8278 100644
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -621,7 +621,7 @@ def s:GetFilenameChecks(): dict<list<string>>
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'],
diff --git a/src/version.c b/src/version.c
index a8e7488ee..72495c2f9 100644
--- a/src/version.c
+++ b/src/version.c
@@ -704,6 +704,8 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
+/**/
+ 111,
/**/
110,
/**/
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/E1raOhW-00FMC0-Jy%40256bit.org.