]> git.ipfire.org Git - thirdparty/vim.git/commitdiff
patch 9.1.0245: filetype: zsh theme, history and zunit files are not recognized v9.1.0245
authorWu, Zhenyu <wuzhenyu@ustc.edu>
Sun, 31 Mar 2024 17:42:39 +0000 (19:42 +0200)
committerChristian Brabandt <cb@256bit.org>
Sun, 31 Mar 2024 17:42:39 +0000 (19:42 +0200)
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>
runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index e1d77325825943e61f62b2abd50c27e4f5a2b1a8..fe450b8b137440e44c9bebc0345b64305b180438 100644 (file)
@@ -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
index a1f7e22212523de6ba9edff83aa32de2984cde85..f3cc9390255bfb6404635f27aefe2927bf8df081 100644 (file)
@@ -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'],
 
index a6755acaae3fca42dfe36dcaf0f5f0c2042d4e9d..490812988b939fed1fcfba63f5f16a46db6dcf86 100644 (file)
@@ -704,6 +704,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    245,
 /**/
     244,
 /**/