aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/fs.lua
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2025-01-01 12:29:51 -0800
committerGitHub <noreply@github.com>2025-01-01 12:29:51 -0800
commitdc692f553aae367a03f286e0d59561247941f96c (patch)
tree5a4bbbf2cc37c583a491258ebba8e2f421e0079a /runtime/lua/vim/fs.lua
parent9d114b720514b0bde96dbdd9b6ef328d232a1589 (diff)
downloadrneovim-dc692f553aae367a03f286e0d59561247941f96c.tar.gz
rneovim-dc692f553aae367a03f286e0d59561247941f96c.tar.bz2
rneovim-dc692f553aae367a03f286e0d59561247941f96c.zip
docs: misc #31479
Diffstat (limited to 'runtime/lua/vim/fs.lua')
-rw-r--r--runtime/lua/vim/fs.lua10
1 files changed, 7 insertions, 3 deletions
diff --git a/runtime/lua/vim/fs.lua b/runtime/lua/vim/fs.lua
index 1b774d5cab..d042df96e5 100644
--- a/runtime/lua/vim/fs.lua
+++ b/runtime/lua/vim/fs.lua
@@ -105,9 +105,13 @@ function M.basename(file)
return file:match('/$') and '' or (file:match('[^/]*$'))
end
---- Concatenates partial paths into one path. Slashes are normalized (redundant slashes are removed, and on Windows backslashes are replaced with forward-slashes)
---- (e.g., `"foo/"` and `"/bar"` get joined to `"foo/bar"`)
---- (windows: e.g `"a\foo\"` and `"\bar"` are joined to `"a/foo/bar"`)
+--- Concatenates partial paths (one absolute or relative path followed by zero or more relative
+--- paths). Slashes are normalized: redundant slashes are removed, and (on Windows) backslashes are
+--- replaced with forward-slashes.
+---
+--- Examples:
+--- - "foo/", "/bar" => "foo/bar"
+--- - Windows: "a\foo\", "\bar" => "a/foo/bar"
---
---@since 12
---@param ... string