Patch 8.2.2714
Problem: Filetype pattern ending in star is too far up.
Solution: Move down to where patterns ending in star belong. (closes #8065)
Files: runtime/filetype.vim, src/testdir/test_filetype.vim
*** ../vim-8.2.2713/runtime/filetype.vim 2021-04-02 13:00:11.010211953
+0200
--- runtime/filetype.vim 2021-04-05 13:04:02.635784267 +0200
***************
*** 1554,1566 ****
au BufNewFile,BufRead catalog setf catalog
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
! " Gentoo ebuilds and Arch Linux PKGBUILDs are actually bash scripts
" NOTE: Patterns ending in a star are further down, these have lower priority.
! au BufNewFile,BufRead
.bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.bash,*/{,.}bash[_-]completion{,.d,.sh}{,/*},*.ebuild,*.eclass,PKGBUILD
call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call
dist#ft#SetFileTypeSH(getline(1))
-
" Shell script (Arch Linux) or PHP file (Drupal)
au BufNewFile,BufRead *.install
\ if getline(1) =~ '<?php' |
--- 1554,1566 ----
au BufNewFile,BufRead catalog setf catalog
" Shell scripts (sh, ksh, bash, bash2, csh); Allow .profile_foo etc.
! " Gentoo ebuilds, Arch Linux PKGBUILDs and Alpine Linux APKBUILDs are actually
! " bash scripts.
" NOTE: Patterns ending in a star are further down, these have lower priority.
! au BufNewFile,BufRead
.bashrc,bashrc,bash.bashrc,.bash[_-]profile,.bash[_-]logout,.bash[_-]aliases,bash-fc[-.],*.ebuild,*.bash,*.eclass,PKGBUILD,APKBUILD
call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc,*.ksh call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead */etc/profile,.profile,*.sh,*.env call
dist#ft#SetFileTypeSH(getline(1))
" Shell script (Arch Linux) or PHP file (Drupal)
au BufNewFile,BufRead *.install
\ if getline(1) =~ '<?php' |
***************
*** 2231,2238 ****
" SGML catalog file
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
" Shell scripts ending in a star
! au BufNewFile,BufRead
.bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,,PKGBUILD*
call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
--- 2231,2241 ----
" SGML catalog file
au BufNewFile,BufRead sgml.catalog* call s:StarSetf('catalog')
+ " avoid doc files being recognized a shell files
+ au BufNewFile,BufRead */doc/{,.}bash[_-]completion{,.d,.sh}{,/*} setf text
+
" Shell scripts ending in a star
! au BufNewFile,BufRead
.bashrc*,.bash[_-]profile*,.bash[_-]logout*,.bash[_-]aliases*,bash-fc[-.]*,PKGBUILD*,APKBUILD*,*/{,.}bash[_-]completion{,.d,.sh}{,/*}
call dist#ft#SetFileTypeSH("bash")
au BufNewFile,BufRead .kshrc* call dist#ft#SetFileTypeSH("ksh")
au BufNewFile,BufRead .profile* call dist#ft#SetFileTypeSH(getline(1))
*** ../vim-8.2.2713/src/testdir/test_filetype.vim 2021-04-02
13:00:11.010211953 +0200
--- src/testdir/test_filetype.vim 2021-04-05 13:07:08.915257464 +0200
***************
*** 434,440 ****
\ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf',
'any/etc/sensors.conf', 'any/etc/sensors3.conf'],
\ 'services': ['/etc/services', 'any/etc/services'],
\ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
! \ 'sh': ['/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf'],
\ 'sieve': ['file.siv', 'file.sieve'],
\ 'simula': ['file.sim'],
\ 'sinda': ['file.sin', 'file.s85'],
--- 434,440 ----
\ 'sensors': ['/etc/sensors.conf', '/etc/sensors3.conf',
'any/etc/sensors.conf', 'any/etc/sensors3.conf'],
\ 'services': ['/etc/services', 'any/etc/services'],
\ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
! \ 'sh': ['.bashrc', 'file.bash',
'/usr/share/doc/bash-completion/filter.sh','/etc/udev/cdsymlinks.conf',
'any/etc/udev/cdsymlinks.conf'],
\ 'sieve': ['file.siv', 'file.sieve'],
\ 'simula': ['file.sim'],
\ 'sinda': ['file.sin', 'file.s85'],
***************
*** 487,493 ****
\ 'tex': ['file.latex', 'file.sty', 'file.dtx', 'file.ltx', 'file.bbl'],
\ 'texinfo': ['file.texinfo', 'file.texi', 'file.txi'],
\ 'texmf': ['texmf.cnf'],
! \ 'text': ['file.text', 'README'],
\ 'tf': ['file.tf', '.tfrc', 'tfrc'],
\ 'tidy': ['.tidyrc', 'tidyrc', 'tidy.conf'],
\ 'tilde': ['file.t.html'],
--- 487,493 ----
\ 'tex': ['file.latex', 'file.sty', 'file.dtx', 'file.ltx', 'file.bbl'],
\ 'texinfo': ['file.texinfo', 'file.texi', 'file.txi'],
\ 'texmf': ['texmf.cnf'],
! \ 'text': ['file.text', 'README',
'/usr/share/doc/bash-completion/AUTHORS'],
\ 'tf': ['file.tf', '.tfrc', 'tfrc'],
\ 'tidy': ['.tidyrc', 'tidyrc', 'tidy.conf'],
\ 'tilde': ['file.t.html'],
*** ../vim-8.2.2713/src/version.c 2021-04-05 12:47:21.146578067 +0200
--- src/version.c 2021-04-05 13:08:42.462992640 +0200
***************
*** 752,753 ****
--- 752,755 ----
{ /* Add new patch number below this line */
+ /**/
+ 2714,
/**/
--
hundred-and-one symptoms of being an internet addict:
59. Your wife says communication is important in a marriage...so you buy
another computer and install a second phone line so the two of you can
chat.
/// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202104051111.135BB88f3030072%40masaka.moolenaar.net.