utils: respect shellslash setting

Use '/' as path separator on Windows when shellslash is set.
This commit is contained in:
Attila Tajti 2022-11-30 20:42:27 +01:00 committed by Stephan Seitz
parent 07ff07ae4c
commit 6ed8a41bd5

View file

@ -13,7 +13,7 @@ end
-- Returns the system specific path seperator.
---@return string
function M.get_path_sep()
return fn.has "win32" == 1 and "\\" or "/"
return (fn.has "win32" == 1 and not vim.opt.shellslash:get()) and "\\" or "/"
end
-- Returns a function that joins the given arguments with separator. Arguments