-
Notifications
You must be signed in to change notification settings - Fork 30.5k
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
Escape special glob chars when using "Find in Folder" #166318
Conversation
For inspiration, see also: Python's glob.escape function. |
@andreamah The screenshot you sent is indeed perplexing, though if it is a legit bug I don't think it's related to my changes -- perhaps the existing globbing functionality is broken on some platforms? Seems unlikely, but I can't think of another reason why it wouldn't be working on your side. Can you share which platform or OS you tried it on? Below are my results on Windows, and everything works as expected:
As you can see, only the results in Re. your comment:
I think what you're proposing is equivalent to saying "let's get rid of globbing as the mechanism to specify search paths in VS Code", which would be a very significant change, likely undesirable, and certainly out of scope for this PR. Globbing is a fine and commonplace choice for search tools, and it requires escaping special characters. I don't see any way around that... This PR simply implemsnts escaping properly, which was missing before. Let me know how I can help further, I think this PR will improve the experience of VSCode users. |
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.
Thinking this over again, it seems to make a lot of sense. I also didn't run into the bug that I ran into last time, so I'll just bring it up again if I see it again.
Thanks for the contribution!!
Fixes #82415