mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	vim-patch:9.1.0305: filetype: some history files are not recognized (#28300)
Problem:  filetype: some history files are not recognized
Solution: Add some history patterns to filetype.vim
          (Wu, Zhenyu)
closes: vim/vim#14513
da70feabea
Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
			
			
This commit is contained in:
		@@ -1295,6 +1295,7 @@ local filename = {
 | 
			
		||||
  ['cfengine.conf'] = 'cfengine',
 | 
			
		||||
  cgdbrc = 'cgdbrc',
 | 
			
		||||
  ['CMakeLists.txt'] = 'cmake',
 | 
			
		||||
  ['.cling_history'] = 'cpp',
 | 
			
		||||
  ['.alias'] = detect.csh,
 | 
			
		||||
  ['.cshrc'] = detect.csh,
 | 
			
		||||
  ['.login'] = detect.csh,
 | 
			
		||||
@@ -1410,6 +1411,7 @@ local filename = {
 | 
			
		||||
  ['ipf.conf'] = 'ipfilter',
 | 
			
		||||
  ['ipf6.conf'] = 'ipfilter',
 | 
			
		||||
  ['ipf.rules'] = 'ipfilter',
 | 
			
		||||
  ['.node_repl_history'] = 'javascript',
 | 
			
		||||
  ['Pipfile.lock'] = 'json',
 | 
			
		||||
  ['.firebaserc'] = 'json',
 | 
			
		||||
  ['.prettierrc'] = 'json',
 | 
			
		||||
@@ -1440,12 +1442,14 @@ local filename = {
 | 
			
		||||
  ['.lsl'] = detect.lsl,
 | 
			
		||||
  ['.busted'] = 'lua',
 | 
			
		||||
  ['.luacheckrc'] = 'lua',
 | 
			
		||||
  ['.lua_history'] = 'lua',
 | 
			
		||||
  ['config.ld'] = 'lua',
 | 
			
		||||
  ['rock_manifest'] = 'lua',
 | 
			
		||||
  ['lynx.cfg'] = 'lynx',
 | 
			
		||||
  ['m3overrides'] = 'm3build',
 | 
			
		||||
  ['m3makefile'] = 'm3build',
 | 
			
		||||
  ['cm3.cfg'] = 'm3quake',
 | 
			
		||||
  ['.m4_history'] = 'm4',
 | 
			
		||||
  ['.followup'] = 'mail',
 | 
			
		||||
  ['.article'] = 'mail',
 | 
			
		||||
  ['.letter'] = 'mail',
 | 
			
		||||
@@ -1519,6 +1523,8 @@ local filename = {
 | 
			
		||||
  ['MANIFEST.in'] = 'pymanifest',
 | 
			
		||||
  ['.pythonstartup'] = 'python',
 | 
			
		||||
  ['.pythonrc'] = 'python',
 | 
			
		||||
  ['.python_history'] = 'python',
 | 
			
		||||
  ['.jline-jython.history'] = 'python',
 | 
			
		||||
  SConstruct = 'python',
 | 
			
		||||
  qmldir = 'qmldir',
 | 
			
		||||
  ['.Rhistory'] = 'r',
 | 
			
		||||
@@ -1537,6 +1543,8 @@ local filename = {
 | 
			
		||||
  Puppetfile = 'ruby',
 | 
			
		||||
  ['.irbrc'] = 'ruby',
 | 
			
		||||
  irbrc = 'ruby',
 | 
			
		||||
  ['.irb_history'] = 'ruby',
 | 
			
		||||
  irb_history = 'ruby',
 | 
			
		||||
  Vagrantfile = 'ruby',
 | 
			
		||||
  ['smb.conf'] = 'samba',
 | 
			
		||||
  screenrc = 'screen',
 | 
			
		||||
@@ -1546,6 +1554,7 @@ local filename = {
 | 
			
		||||
  ['/etc/services'] = 'services',
 | 
			
		||||
  ['/etc/serial.conf'] = 'setserial',
 | 
			
		||||
  ['/etc/udev/cdsymlinks.conf'] = 'sh',
 | 
			
		||||
  ['.ash_history'] = 'sh',
 | 
			
		||||
  ['bash.bashrc'] = detect.bash,
 | 
			
		||||
  bashrc = detect.bash,
 | 
			
		||||
  ['.bashrc'] = detect.bash,
 | 
			
		||||
@@ -1562,6 +1571,7 @@ local filename = {
 | 
			
		||||
  ['/etc/slp.spi'] = 'slpspi',
 | 
			
		||||
  ['.slrnrc'] = 'slrnrc',
 | 
			
		||||
  ['sendmail.cf'] = 'sm',
 | 
			
		||||
  ['.sqlite_history'] = 'sql',
 | 
			
		||||
  ['squid.conf'] = 'squid',
 | 
			
		||||
  ['ssh_config'] = 'sshconfig',
 | 
			
		||||
  ['sshd_config'] = 'sshdconfig',
 | 
			
		||||
@@ -1574,7 +1584,10 @@ local filename = {
 | 
			
		||||
  ['undo.data'] = 'taskdata',
 | 
			
		||||
  ['.tclshrc'] = 'tcl',
 | 
			
		||||
  ['.wishrc'] = 'tcl',
 | 
			
		||||
  ['.tclsh-history'] = 'tcl',
 | 
			
		||||
  ['tclsh.rc'] = 'tcl',
 | 
			
		||||
  ['.xsctcmdhistory'] = 'tcl',
 | 
			
		||||
  ['.xsdbcmdhistory'] = 'tcl',
 | 
			
		||||
  ['texmf.cnf'] = 'texmf',
 | 
			
		||||
  COPYING = 'text',
 | 
			
		||||
  README = 'text',
 | 
			
		||||
@@ -1592,6 +1605,7 @@ local filename = {
 | 
			
		||||
  ['/.cargo/credentials'] = 'toml',
 | 
			
		||||
  ['Cargo.lock'] = 'toml',
 | 
			
		||||
  ['trustees.conf'] = 'trustees',
 | 
			
		||||
  ['.ts_node_repl_history'] = 'typescript',
 | 
			
		||||
  ['/etc/udev/udev.conf'] = 'udevconf',
 | 
			
		||||
  ['/etc/updatedb.conf'] = 'updatedb',
 | 
			
		||||
  ['fdrupstream.log'] = 'upstreamlog',
 | 
			
		||||
 
 | 
			
		||||
@@ -346,7 +346,7 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'janet': ['file.janet'],
 | 
			
		||||
    \ 'java': ['file.java', 'file.jav'],
 | 
			
		||||
    \ 'javacc': ['file.jj', 'file.jjt'],
 | 
			
		||||
    \ 'javascript': ['file.js', 'file.jsm', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs'],
 | 
			
		||||
    \ 'javascript': ['file.js', 'file.jsm', 'file.javascript', 'file.es', 'file.mjs', 'file.cjs', '.node_repl_history'],
 | 
			
		||||
    \ 'javascript.glimmer': ['file.gjs'],
 | 
			
		||||
    \ 'javascriptreact': ['file.jsx'],
 | 
			
		||||
    \ 'jess': ['file.clp'],
 | 
			
		||||
@@ -400,13 +400,13 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'lpc': ['file.lpc', 'file.ulpc'],
 | 
			
		||||
    \ 'lsl': ['file.lsl'],
 | 
			
		||||
    \ 'lss': ['file.lss'],
 | 
			
		||||
    \ 'lua': ['file.lua', 'file.tlu', 'file.rockspec', 'file.nse', '.luacheckrc', '.busted', 'rock_manifest', 'config.ld'],
 | 
			
		||||
    \ 'lua': ['file.lua', 'file.tlu', 'file.rockspec', 'file.nse', '.lua_history', '.luacheckrc', '.busted', 'rock_manifest', 'config.ld'],
 | 
			
		||||
    \ 'luau': ['file.luau'],
 | 
			
		||||
    \ 'lynx': ['lynx.cfg'],
 | 
			
		||||
    \ 'lyrics': ['file.lrc'],
 | 
			
		||||
    \ 'm3build': ['m3makefile', 'm3overrides'],
 | 
			
		||||
    \ 'm3quake': ['file.quake', 'cm3.cfg'],
 | 
			
		||||
    \ 'm4': ['file.at'],
 | 
			
		||||
    \ 'm4': ['file.at', '.m4_history'],
 | 
			
		||||
    \ 'mail': ['snd.123', '.letter', '.letter.123', '.followup', '.article', '.article.123', 'pico.123', 'mutt-xx-xxx', 'muttng-xx-xxx', 'ae123.txt', 'file.eml', 'reportbug-file'],
 | 
			
		||||
    \ 'mailaliases': ['/etc/mail/aliases', '/etc/aliases', 'any/etc/aliases', 'any/etc/mail/aliases'],
 | 
			
		||||
    \ 'mailcap': ['.mailcap', 'mailcap'],
 | 
			
		||||
@@ -568,7 +568,7 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'pymanifest': ['MANIFEST.in'],
 | 
			
		||||
    \ 'pyret': ['file.arr'],
 | 
			
		||||
    \ 'pyrex': ['file.pyx', 'file.pxd'],
 | 
			
		||||
    \ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', 'file.ptl', 'file.pyi', 'SConstruct'],
 | 
			
		||||
    \ 'python': ['file.py', 'file.pyw', '.pythonstartup', '.pythonrc', '.python_history', '.jline-jython.history', 'file.ptl', 'file.pyi', 'SConstruct'],
 | 
			
		||||
    \ 'ql': ['file.ql', 'file.qll'],
 | 
			
		||||
    \ 'qml': ['file.qml', 'file.qbs'],
 | 
			
		||||
    \ 'qmldir': ['qmldir'],
 | 
			
		||||
@@ -608,7 +608,7 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'rrst': ['file.rrst', 'file.srst'],
 | 
			
		||||
    \ 'rst': ['file.rst'],
 | 
			
		||||
    \ 'rtf': ['file.rtf'],
 | 
			
		||||
    \ 'ruby': ['.irbrc', 'irbrc', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file', 'Puppetfile', 'Vagrantfile'],
 | 
			
		||||
    \ 'ruby': ['.irbrc', 'irbrc', '.irb_history', 'irb_history', 'file.rb', 'file.rbw', 'file.gemspec', 'file.ru', 'Gemfile', 'file.builder', 'file.rxml', 'file.rjs', 'file.rant', 'file.rake', 'rakefile', 'Rakefile', 'rantfile', 'Rantfile', 'rakefile-file', 'Rakefile-file', 'Puppetfile', 'Vagrantfile'],
 | 
			
		||||
    \ 'rust': ['file.rs'],
 | 
			
		||||
    \ 'samba': ['smb.conf'],
 | 
			
		||||
    \ 'sas': ['file.sas'],
 | 
			
		||||
@@ -628,7 +628,7 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'services': ['/etc/services', 'any/etc/services'],
 | 
			
		||||
    \ 'setserial': ['/etc/serial.conf', 'any/etc/serial.conf'],
 | 
			
		||||
    \ 'sexplib': ['file.sexp'],
 | 
			
		||||
    \ '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', '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats'],
 | 
			
		||||
    \ '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', '/etc/udev/cdsymlinks.conf', 'any/etc/udev/cdsymlinks.conf', 'file.bats', '.ash_history'],
 | 
			
		||||
    \ 'sieve': ['file.siv', 'file.sieve'],
 | 
			
		||||
    \ 'sil': ['file.sil'],
 | 
			
		||||
    \ 'simula': ['file.sim'],
 | 
			
		||||
@@ -659,7 +659,7 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'spice': ['file.sp', 'file.spice'],
 | 
			
		||||
    \ 'spup': ['file.speedup', 'file.spdata', 'file.spd'],
 | 
			
		||||
    \ 'spyce': ['file.spy', 'file.spi'],
 | 
			
		||||
    \ 'sql': ['file.tyb', 'file.tyc', 'file.pkb', 'file.pks'],
 | 
			
		||||
    \ 'sql': ['file.tyb', 'file.tyc', 'file.pkb', 'file.pks', '.sqlite_history'],
 | 
			
		||||
    \ 'sqlj': ['file.sqlj'],
 | 
			
		||||
    \ 'prql': ['file.prql'],
 | 
			
		||||
    \ 'sqr': ['file.sqr', 'file.sqi'],
 | 
			
		||||
@@ -731,7 +731,7 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'tal': ['file.tal'],
 | 
			
		||||
    \ 'taskdata': ['pending.data', 'completed.data', 'undo.data'],
 | 
			
		||||
    \ 'taskedit': ['file.task'],
 | 
			
		||||
    \ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc'],
 | 
			
		||||
    \ 'tcl': ['file.tcl', 'file.tm', 'file.tk', 'file.itcl', 'file.itk', 'file.jacl', '.tclshrc', 'tclsh.rc', '.wishrc', '.tclsh-history', '.xsctcmdhistory', '.xsdbcmdhistory'],
 | 
			
		||||
    \ 'tablegen': ['file.td'],
 | 
			
		||||
    \ 'teal': ['file.tl'],
 | 
			
		||||
    \ 'template': ['file.tmpl'],
 | 
			
		||||
@@ -759,7 +759,7 @@ func s:GetFilenameChecks() abort
 | 
			
		||||
    \ 'tssop': ['file.tssop'],
 | 
			
		||||
    \ 'tsv': ['file.tsv'],
 | 
			
		||||
    \ 'twig': ['file.twig'],
 | 
			
		||||
    \ 'typescript': ['file.mts', 'file.cts'],
 | 
			
		||||
    \ 'typescript': ['file.mts', 'file.cts', '.ts_node_repl_history'],
 | 
			
		||||
    \ 'typescript.glimmer': ['file.gts'],
 | 
			
		||||
    \ 'typescriptreact': ['file.tsx'],
 | 
			
		||||
    \ 'typespec': ['file.tsp'],
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user