Updates utils

This commit is contained in:
Dennis Schoepf 2025-04-09 19:05:50 +02:00
parent f9aa694520
commit 2162ce7744

View file

@ -35,6 +35,10 @@ function search_ancestors(startpath, func)
end end
end end
local function escape_wildcards(path)
return path:gsub('([%[%]%?%*])', '\\%1')
end
function strip_archive_subpath(path) function strip_archive_subpath(path)
-- Matches regex from zip.vim / tar.vim -- Matches regex from zip.vim / tar.vim
path = vim.fn.substitute(path, 'zipfile://\\(.\\{-}\\)::[^\\\\].*$', '\\1', '') path = vim.fn.substitute(path, 'zipfile://\\(.\\{-}\\)::[^\\\\].*$', '\\1', '')