diff options
| author | James Trew <66286082+jamestrew@users.noreply.github.com> | 2024-03-29 12:23:01 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-03-29 17:23:01 +0100 |
| commit | 38e38d1b401e38459842f0e4da431e3dd6c2e527 (patch) | |
| tree | 3784f17a2835641bdf576c230e2eddfc14bb04b3 /runtime/doc | |
| parent | 36acb2a8ec905069e382bb3b6db6b6ac677bce39 (diff) | |
| download | rneovim-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.txt | 9 |
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' |