diff options
author | Christian Clason <c.clason@uni-graz.at> | 2024-03-31 19:25:07 +0200 |
---|---|---|
committer | Christian Clason <c.clason@uni-graz.at> | 2024-04-01 12:01:47 +0200 |
commit | 239101e32afbbaef679b1c310bbbee65c57141a2 (patch) | |
tree | e2ba78117ecafbd17a747172611d26fdc6c856dd | |
parent | 1a0b27965c13cf0f2d405bed341621ec8cdf3d70 (diff) | |
download | rneovim-239101e32afbbaef679b1c310bbbee65c57141a2.tar.gz rneovim-239101e32afbbaef679b1c310bbbee65c57141a2.tar.bz2 rneovim-239101e32afbbaef679b1c310bbbee65c57141a2.zip |
vim-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: vim/vim#14365
https://github.com/vim/vim/commit/84ce55001af80d89245c4dd051c6f809389df62f
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
-rw-r--r-- | runtime/lua/vim/filetype.lua | 1 | ||||
-rw-r--r-- | test/old/testdir/test_filetype.vim | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index c721d387b9..a1ce5f1edf 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1953,6 +1953,7 @@ local pattern = { ['.*/etc/serial%.conf'] = 'setserial', ['.*/etc/udev/cdsymlinks%.conf'] = 'sh', ['%.bash[_%-]aliases'] = detect.bash, + ['%.bash[_%-]history'] = detect.bash, ['%.bash[_%-]logout'] = detect.bash, ['%.bash[_%-]profile'] = detect.bash, ['%.kshrc.*'] = detect.ksh, diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index d218d4cb12..c0ab747274 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -582,7 +582,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', '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'], |