Skip to content

Commit a55a22a

Browse files
Freed-Wuchrisbra
authored andcommitted
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: #14366 Signed-off-by: Wu, Zhenyu <[email protected]> Signed-off-by: Christian Brabandt <[email protected]>
1 parent 84ce550 commit a55a22a

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

runtime/filetype.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,8 +2047,8 @@ au BufNewFile,BufRead *.zs setf zserio
20472047

20482048
" Z-Shell script (patterns ending in a star further below)
20492049
au BufNewFile,BufRead .zprofile,*/etc/zprofile,.zfbfmarks setf zsh
2050-
au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump setf zsh
2051-
au BufNewFile,BufRead *.zsh setf zsh
2050+
au BufNewFile,BufRead .zshrc,.zshenv,.zlogin,.zlogout,.zcompdump,.zsh_history setf zsh
2051+
au BufNewFile,BufRead *.zsh,*.zsh-theme,*.zunit setf zsh
20522052

20532053
" Scheme ("racket" patterns are now separate, see above)
20542054
au BufNewFile,BufRead *.scm,*.ss,*.sld setf scheme

src/testdir/test_filetype.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -828,8 +828,8 @@ def s:GetFilenameChecks(): dict<list<string>>
828828
zimbu: ['file.zu'],
829829
zimbutempl: ['file.zut'],
830830
zserio: ['file.zs'],
831-
zsh: ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh',
832-
'.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc',
831+
zsh: ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh', 'file.zsh-theme', 'file.zunit',
832+
'.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc', '.zsh_history',
833833
'.zcompdump-file', '.zlog', '.zlog-file', '.zsh', '.zsh-file',
834834
'any/etc/zprofile', 'zlog', 'zlog-file', 'zsh', 'zsh-file'],
835835

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,8 @@ static char *(features[]) =
704704

705705
static int included_patches[] =
706706
{ /* Add new patch number below this line */
707+
/**/
708+
245,
707709
/**/
708710
244,
709711
/**/

0 commit comments

Comments
 (0)