Skip to content

Commit 053a2c5

Browse files
clasonFreed-Wu
andcommitted
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 vim/vim@84ce550 Co-authored-by: Wu, Zhenyu <[email protected]>
1 parent fc4e70a commit 053a2c5

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

runtime/lua/vim/filetype.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,7 @@ local pattern = {
19531953
['.*/etc/serial%.conf'] = 'setserial',
19541954
['.*/etc/udev/cdsymlinks%.conf'] = 'sh',
19551955
['%.bash[_%-]aliases'] = detect.bash,
1956+
['%.bash[_%-]history'] = detect.bash,
19561957
['%.bash[_%-]logout'] = detect.bash,
19571958
['%.bash[_%-]profile'] = detect.bash,
19581959
['%.kshrc.*'] = detect.ksh,

test/old/testdir/test_filetype.vim

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ func s:GetFilenameChecks() abort
582582
\ 'services': ['/etc/services', 'any/etc/services'],
583583
\ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
584584
\ 'sexplib': ['file.sexp'],
585-
\ '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'],
585+
\ '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'],
586586
\ 'sieve': ['file.siv', 'file.sieve'],
587587
\ 'sil': ['file.sil'],
588588
\ 'simula': ['file.sim'],

0 commit comments

Comments
 (0)