From 25fa051fa157ca4bce712e61602447a4222581ca Mon Sep 17 00:00:00 2001 From: Lewis Russell Date: Sun, 26 Mar 2023 13:01:48 +0100 Subject: feat(vim.fs): improve normalize - Add options argument with an option to expand env vars - Resolve '//' -> '/' - Use in vim.loader --- runtime/doc/lua.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'runtime/doc') diff --git a/runtime/doc/lua.txt b/runtime/doc/lua.txt index 58522ac1f3..33833fa83e 100644 --- a/runtime/doc/lua.txt +++ b/runtime/doc/lua.txt @@ -2502,7 +2502,7 @@ find({names}, {opts}) *vim.fs.find()* (table) Normalized paths |vim.fs.normalize()| of all matching files or directories -normalize({path}) *vim.fs.normalize()* +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 @@ -2522,6 +2522,9 @@ normalize({path}) *vim.fs.normalize()* Parameters: ~ • {path} (string) Path to normalize + • {opts} (table|nil) Options: + • expand_env: boolean Expand environment variables (default: + true) Return: ~ (string) Normalized path -- cgit