diff --git a/runtime/lua/vim/filetype.lua b/runtime/lua/vim/filetype.lua index e64923ab54..9141b1e4c6 100644 --- a/runtime/lua/vim/filetype.lua +++ b/runtime/lua/vim/filetype.lua @@ -1656,6 +1656,11 @@ local pattern = { ['.*/dtrace/.*%.d'] = 'dtrace', ['.*esmtprc'] = 'esmtprc', ['.*Eterm/.*%.cfg'] = 'eterm', + ['.*s6.*/up'] = 'execline', + ['.*s6.*/down'] = 'execline', + ['.*s6.*/run'] = 'execline', + ['.*s6.*/finish'] = 'execline', + ['s6%-.*'] = 'execline', ['[a-zA-Z0-9].*Dict'] = detect.foam, ['[a-zA-Z0-9].*Dict%..*'] = detect.foam, ['[a-zA-Z].*Properties'] = detect.foam, diff --git a/runtime/lua/vim/filetype/detect.lua b/runtime/lua/vim/filetype/detect.lua index 9d0f1bd3ab..a1c5ac73b4 100644 --- a/runtime/lua/vim/filetype/detect.lua +++ b/runtime/lua/vim/filetype/detect.lua @@ -1661,6 +1661,7 @@ local patterns_hashbang = { ['^\\%(rexx\\|regina\\)\\>'] = { 'rexx', { vim_regex = true } }, ['^janet\\>'] = { 'janet', { vim_regex = true } }, ['^dart\\>'] = { 'dart', { vim_regex = true } }, + ['^execlineb\\>'] = { 'execline', { vim_regex = true } }, } ---@private diff --git a/test/old/testdir/test_filetype.vim b/test/old/testdir/test_filetype.vim index 4288a5bde5..9f493bb792 100644 --- a/test/old/testdir/test_filetype.vim +++ b/test/old/testdir/test_filetype.vim @@ -226,6 +226,7 @@ func s:GetFilenameChecks() abort \ 'esqlc': ['file.ec', 'file.EC'], \ 'esterel': ['file.strl'], \ 'eterm': ['anyEterm/file.cfg', 'Eterm/file.cfg', 'some-Eterm/file.cfg'], + \ 'execline': ['/etc/s6-rc/run', './s6-rc/src/dbus-srv/up', '/sbin/s6-shutdown'], \ 'exim': ['exim.conf'], \ 'expect': ['file.exp'], \ 'exports': ['exports'], @@ -828,6 +829,7 @@ let s:script_checks = { \ ['#!/path/itclsh'], \ ['#!/path/itkwish']], \ 'expect': [['#!/path/expect']], + \ 'execline': [['#!/sbin/execlineb -S0'], ['#!/usr/bin/execlineb']], \ 'gnuplot': [['#!/path/gnuplot']], \ 'make': [['#!/path/make']], \ 'nix': [['#!/path/nix-shell']], @@ -879,6 +881,7 @@ let s:script_env_checks = { \ 'perl': [['#!/usr/bin/env VAR=val perl']], \ 'scala': [['#!/usr/bin/env VAR=val VVAR=vval scala']], \ 'awk': [['#!/usr/bin/env VAR=val -i awk']], + \ 'execline': [['#!/usr/bin/env execlineb']], \ 'scheme': [['#!/usr/bin/env VAR=val --ignore-environment scheme']], \ 'python': [['#!/usr/bin/env VAR=val -S python -w -T']], \ 'wml': [['#!/usr/bin/env VAR=val --split-string wml']],