aboutsummaryrefslogtreecommitdiff
path: root/runtime/doc
diff options
context:
space:
mode:
authorJames Trew <66286082+jamestrew@users.noreply.github.com>2024-03-29 12:23:01 -0400
committerGitHub <noreply@github.com>2024-03-29 17:23:01 +0100
commit38e38d1b401e38459842f0e4da431e3dd6c2e527 (patch)
tree3784f17a2835641bdf576c230e2eddfc14bb04b3 /runtime/doc
parent36acb2a8ec905069e382bb3b6db6b6ac677bce39 (diff)
downloadrneovim-38e38d1b401e38459842f0e4da431e3dd6c2e527.tar.gz
rneovim-38e38d1b401e38459842f0e4da431e3dd6c2e527.tar.bz2
rneovim-38e38d1b401e38459842f0e4da431e3dd6c2e527.zip
fix(fs): allow backslash characters in unix paths
Backslashes are valid characters in unix style paths. Fix the conversion of backslashes to forward slashes in several `vim.fs` functions when not on Windows. On Windows, backslashes will still be converted to forward slashes.
Diffstat (limited to 'runtime/doc')
-rw-r--r--runtime/doc/lua.txt9
1 files changed, 5 insertions, 4 deletions
diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt
index b9bc73e0b8..e02ed20644 100644
--- a/runtime/doc/lua.txt
+++ b/runtime/doc/lua.txt
@@ -2954,13 +2954,14 @@ vim.fs.joinpath({...}) *vim.fs.joinpath()*
vim.fs.normalize({path}, {opts}) *vim.fs.normalize()*
Normalize a path to a standard format. A tilde (~) character at the
- beginning of the path is expanded to the user's home directory and any
- backslash (\) characters are converted to forward slashes (/). Environment
- variables are also expanded.
+ beginning of the path is expanded to the user's home directory and
+ environment variables are also expanded.
+
+ On Windows, backslash (\) characters are converted to forward slashes (/).
Examples: >lua
vim.fs.normalize('C:\\\\Users\\\\jdoe')
- -- 'C:/Users/jdoe'
+ -- On Windows: 'C:/Users/jdoe'
vim.fs.normalize('~/src/neovim')
-- '/home/jdoe/src/neovim'