Skip to content

Commit

Permalink
patch 9.1.0245: filetype: zsh theme, history and zunit files are not …
Browse files Browse the repository at this point in the history
…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 <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
  • Loading branch information
Freed-Wu authored and chrisbra committed Mar 31, 2024
1 parent 84ce550 commit a55a22a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions runtime/filetype.vim
Expand Up @@ -2047,8 +2047,8 @@ au BufNewFile,BufRead *.zs setf zserio

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

" Scheme ("racket" patterns are now separate, see above)
au BufNewFile,BufRead *.scm,*.ss,*.sld setf scheme
Expand Down
4 changes: 2 additions & 2 deletions src/testdir/test_filetype.vim
Expand Up @@ -828,8 +828,8 @@ def s:GetFilenameChecks(): dict<list<string>>
zimbu: ['file.zu'],
zimbutempl: ['file.zut'],
zserio: ['file.zs'],
zsh: ['.zprofile', '/etc/zprofile', '.zfbfmarks', 'file.zsh',
'.zcompdump', '.zlogin', '.zlogout', '.zshenv', '.zshrc',
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'],

Expand Down
2 changes: 2 additions & 0 deletions src/version.c
Expand Up @@ -704,6 +704,8 @@ static char *(features[]) =

static int included_patches[] =
{ /* Add new patch number below this line */
/**/
245,
/**/
244,
/**/
Expand Down

0 comments on commit a55a22a

Please sign in to comment.