vim-patch:9.1.0965: filetype: sh filetype set when detecting the use of bash (#31749)

Problem:  filetype: sh filetype set when detecting the use of bash
Solution: when bash is detected, use 'bash' filetype instead
          (Luca Saccarola)

closes: vim/vim#16309

b9b762c21f
This commit is contained in:
Luca Saccarola
2024-12-28 12:20:50 +01:00
committed by GitHub
parent bc624ccffd
commit 2b07b14eac
3 changed files with 11 additions and 8 deletions

View File

@@ -1494,6 +1494,7 @@ local function sh(path, contents, name)
vim.b[b].is_kornshell = nil
vim.b[b].is_sh = nil
end
return M.shell(path, contents, 'bash'), on_detect
-- Ubuntu links sh to dash
elseif matchregex(name, [[\<\(sh\|dash\)\>]]) then
on_detect = function(b)