New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(filetype.lua): escape expansion of ~ when used as a pattern #18353
Conversation
@dundargoc regen-api-docs failed:
|
Cannot read property 'match' of null |
Git push to origin failed for release-0.7 with exitcode 1 |
if as_pattern then | ||
-- Escape Lua's metacharacters when $HOME is used in a pattern. | ||
-- The rest of path should already be properly escaped. | ||
normal = vim.env.HOME:gsub('[-^$()%%.%[%]+?]', '%%%0') .. normal:sub(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is vim.pesc
useful here?
neovim/runtime/lua/vim/shared.lua
Line 507 in b470ff0
function vim.pesc(s) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that would have been useful to notice. :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There will be more than one opportunity to refactor filetype.lua
(e.g., as part of #18241) ;)
No description provided.