Skip to content

Commit 6596508

Browse files
clasonFreed-Wu
andcommitted
vim-patch:9.1.0245: filetype: zsh theme, history and zunit files are not recognized
Problem: filetype: zsh theme, history and zunit files are not recognized. Solution: Detect '.zsh_history', '*.zsh-theme' and '*.zunit' as zsh (Wu, Zhenyu) closes: vim/vim#14366 vim/vim@a55a22a Co-authored-by: Wu, Zhenyu <[email protected]>
1 parent 053a2c5 commit 6596508

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

runtime/lua/vim/filetype.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1155,6 +1155,8 @@ local extension = {
11551155
zut = 'zimbutempl',
11561156
zs = 'zserio',
11571157
zsh = 'zsh',
1158+
zunit = 'zsh',
1159+
['zsh-theme'] = 'zsh',
11581160
vala = 'vala',
11591161
web = detect.web,
11601162
pl = detect.pl,
@@ -1573,6 +1575,7 @@ local filename = {
15731575
['.zshrc'] = 'zsh',
15741576
['.zprofile'] = 'zsh',
15751577
['.zcompdump'] = 'zsh',
1578+
['.zsh_history'] = 'zsh',
15761579
['.zshenv'] = 'zsh',
15771580
['.zfbfmarks'] = 'zsh',
15781581
-- END FILENAME

test/old/testdir/test_filetype.vim

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -750,8 +750,7 @@ func s:GetFilenameChecks() abort
750750
\ 'zimbu': ['file.zu'],
751751
\ 'zimbutempl': ['file.zut'],
752752
\ 'zserio': ['file.zs'],
753-
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
754-
\
753+
\ 'zsh': ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', 'file.zsh-theme', 'file.zunit', '.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zsh_history', '.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file', 'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
755754
\ 'help': [$VIMRUNTIME . '/doc/help.txt'],
756755
\ }
757756
endfunc

0 commit comments

Comments
 (0)