vim-patch:9.1.0596: filetype: devscripts config files are not recognized (#29773)

Problem:  filetype: Debian devscripts config files are not recognized
Solution: detect devscripts.conf and .devscripts files as sh filetype
          (sourced by /bin/sh)

closes: vim/vim#15227

76c19028ff

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
This commit is contained in:
Christian Clason 2024-07-18 09:13:16 +02:00 committed by GitHub
parent f69cfc6712
commit c69ea53c9d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 1 deletions

View File

@ -1626,6 +1626,8 @@ local filename = {
['/etc/serial.conf'] = 'setserial', ['/etc/serial.conf'] = 'setserial',
['/etc/udev/cdsymlinks.conf'] = 'sh', ['/etc/udev/cdsymlinks.conf'] = 'sh',
['.ash_history'] = 'sh', ['.ash_history'] = 'sh',
['.devscripts'] = 'sh',
['devscripts.conf'] = 'sh',
['makepkg.conf'] = 'sh', ['makepkg.conf'] = 'sh',
['.makepkg.conf'] = 'sh', ['.makepkg.conf'] = 'sh',
['user-dirs.dirs'] = 'sh', ['user-dirs.dirs'] = 'sh',

View File

@ -652,7 +652,8 @@ func s:GetFilenameChecks() abort
\ 'sh': ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '.bash_history', '.bash-history', \ 'sh': ['.bashrc', '.bash_profile', '.bash-profile', '.bash_logout', '.bash-logout', '.bash_aliases', '.bash-aliases', '.bash_history', '.bash-history',
\ '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh', \ '/tmp/bash-fc-3Ozjlw', '/tmp/bash-fc.3Ozjlw', 'PKGBUILD', 'APKBUILD', 'file.bash', '/usr/share/doc/bash-completion/filter.sh',
\ '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats', '.ash_history', 'any/etc/neofetch/config.conf', '.xprofile', \ '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats', '.ash_history', 'any/etc/neofetch/config.conf', '.xprofile',
\ 'user-dirs.defaults', 'user-dirs.dirs', 'makepkg.conf', '.makepkg.conf', 'file.mdd', 'file.cygport', '.env', '.envrc'], \ 'user-dirs.defaults', 'user-dirs.dirs', 'makepkg.conf', '.makepkg.conf', 'file.mdd', 'file.cygport', '.env', '.envrc', 'devscripts.conf',
\ '.devscripts'],
\ 'sieve': ['file.siv', 'file.sieve'], \ 'sieve': ['file.siv', 'file.sieve'],
\ 'sil': ['file.sil'], \ 'sil': ['file.sil'],
\ 'simula': ['file.sim'], \ 'simula': ['file.sim'],