Escape special glob chars when using "Find in Folder"#166318
Escape special glob chars when using "Find in Folder"#166318andreamah merged 9 commits intomicrosoft:mainfrom
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. |
andreamah
left a comment
There was a problem hiding this comment.
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