]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0244: filetype: bash history files are not recognized v9.1.0244
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sun, 31 Mar 2024 17:22:51 +0000 (19:22 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 31 Mar 2024 17:22:51 +0000 (19:22 +0200)
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>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index c06a056294b4346beaa5893eb106cefe8ca2e355..e1d77325825943e61f62b2abd50c27e4f5a2b1a8 100644 (file)
@@ -2020,7 +2020,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,*.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))
 
index c4a57a090eb22a9d6f38e4b883f1a52032951e8c..a1f7e22212523de6ba9edff83aa32de2984cde85 100644 (file)
@@ -622,7 +622,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', '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'],
index b89c6c874edb31717cca8e0766d2e42b2b2b5868..a6755acaae3fca42dfe36dcaf0f5f0c2042d4e9d 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    244,
 /**/
     243,
 /**/