File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ local has_cygpath = vim.fn.executable "cygpath" == 1
10
10
M .is_unix = vim .fn .has " unix" == 1
11
11
M .is_macos = vim .fn .has " mac" == 1 or vim .fn .has " macunix" == 1
12
12
M .is_wsl = vim .fn .has " wsl" == 1
13
- -- false for WSL
14
13
M .is_windows = vim .fn .has " win32" == 1 or vim .fn .has " win32unix" == 1
15
14
16
15
function M .path_to_matching_str (path )
@@ -44,6 +43,11 @@ function M.path_split(path)
44
43
return path :gmatch (" [^" .. path_separator .. " ]+" .. path_separator .. " ?" )
45
44
end
46
45
46
+ --- Normalise a path:
47
+ --- windows: replace slashes with backslashes
48
+ --- cygwin: resolve path first via cygpath
49
+ --- @param path string
50
+ --- @return string | nil nil on cygpath failure
47
51
function M .norm_path (path )
48
52
if M .is_windows then
49
53
-- msys2 git support
You can’t perform that action at this time.
0 commit comments