]> granicus.if.org Git - vim/commitdiff
patch 8.2.2690: PowerShell files are not recognized v8.2.2690
authorBram Moolenaar <Bram@vim.org>
Fri, 2 Apr 2021 11:00:15 +0000 (13:00 +0200)
committerBram Moolenaar <Bram@vim.org>
Fri, 2 Apr 2021 11:00:15 +0000 (13:00 +0200)
Problem:    PowerShell files are not recognized.
Solution:   Recognize several PowerShell extension. (Heath Stewart,
            closes #8051)

runtime/filetype.vim
src/testdir/test_filetype.vim
src/version.c

index c34b63b61725910f3b4336177d4991f936126933..f85ac81d3d6bdb9a1d9d2a1916e164ec7d9ed59f 100644 (file)
@@ -1279,6 +1279,11 @@ au BufNewFile,BufRead .povrayrc                  setf povini
 " Povray, Pascal, PHP or assembly
 au BufNewFile,BufRead *.inc                    call dist#ft#FTinc()
 
+" PowerShell
+au BufNewFile,BufRead  *.ps1,*.psd1,*.psm1,*.pssc      setf ps1
+au BufNewFile,BufRead  *.ps1xml                        setf ps1xml
+au BufNewFile,BufRead  *.cdxml,*.psc1                  setf xml
+
 " Printcap and Termcap
 au BufNewFile,BufRead *printcap
        \ let b:ptcap_type = "print" | setf ptcap
index 05ea8e3974deabc1e8669e879bb7caf872b71b17..207648f61427b9335e13b0fefc1772a1dbb74c67 100644 (file)
@@ -387,6 +387,8 @@ let s:filename_checks = {
     \ 'promela': ['file.pml'],
     \ 'proto': ['file.proto'],
     \ 'protocols': ['/etc/protocols', 'any/etc/protocols'],
+    \ 'ps1': ['file.ps1', 'file.psd1', 'file.psm1', 'file.pssc'],
+    \ 'ps1xml': ['file.ps1xml'],
     \ 'psf': ['file.psf'],
     \ 'puppet': ['file.pp'],
     \ 'pyrex': ['file.pyx', 'file.pxd'],
@@ -538,7 +540,7 @@ let s:filename_checks = {
     \ 'xhtml': ['file.xhtml', 'file.xht'],
     \ 'xinetd': ['/etc/xinetd.conf', '/etc/xinetd.d/file', 'any/etc/xinetd.conf', 'any/etc/xinetd.d/file'],
     \ 'xmath': ['file.msc', 'file.msf'],
-    \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss'],
+    \ 'xml': ['/etc/blkid.tab', '/etc/blkid.tab.old', 'file.xmi', 'file.csproj', 'file.csproj.user', 'file.ui', 'file.tpm', '/etc/xdg/menus/file.menu', 'fglrxrc', 'file.xlf', 'file.xliff', 'file.xul', 'file.wsdl', 'file.wpl', 'any/etc/blkid.tab', 'any/etc/blkid.tab.old', 'any/etc/xdg/menus/file.menu', 'file.atom', 'file.rss', 'file.cdxml', 'file.psc1'],
     \ 'xmodmap': ['anyXmodmap', 'Xmodmap', 'some-Xmodmap', 'some-xmodmap', 'some-xmodmap-file', 'xmodmap', 'xmodmap-file'],
     \ 'xf86conf': ['xorg.conf', 'xorg.conf-4'],
     \ 'xpm2': ['file.xpm2'],
index 743fbfb0d313b7df3047bbadecf52fbd6b3128d8..7e446dc42b997b953a2be76e839a1505e944024c 100644 (file)
@@ -750,6 +750,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    2690,
 /**/
     2689,
 /**/