changeset 34731:8cbd16df0cae v9.1.0244

patch 9.1.0244: filetype: bash history files are not recognized Commit: https://github.com/vim/vim/commit/84ce55001af80d89245c4dd051c6f809389df62f Author: Wu, Zhenyu <wuzhenyu@ustc.edu> Date: Sun Mar 31 19:22:51 2024 +0200 patch 9.1.0244: filetype: bash history files are not recognized Problem: filetype: bash history files are not recognized Solution: detect .bash-history and .bash_history files as bash (Wu, Zhenyu) closes: #14365 Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Sun, 31 Mar 2024 19:30:07 +0200
parents 50b4860648f3
children de2d9e7ac327
files runtime/filetype.vim src/testdir/test_filetype.vim src/version.c
diffstat 3 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/runtime/filetype.vim
+++ b/runtime/filetype.vim
@@ -2020,7 +2020,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,*.bats call dist#ft#SetFileTypeSH("bash")
+au BufNewFile,BufRead .bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,.bash[_-]history,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))
 
--- a/src/testdir/test_filetype.vim
+++ b/src/testdir/test_filetype.vim
@@ -622,7 +622,7 @@ def s:GetFilenameChecks(): dict<list<str
     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', 'file.bats'],
+    sh: ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '.bash_history', '.bash-history', '/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'],
--- a/src/version.c
+++ b/src/version.c
@@ -705,6 +705,8 @@ static char *(features[]) =
 static int included_patches[] =
 {   /* Add new patch number below this line */
 /**/
+    244,
+/**/
     243,
 /**/
     242,