Make Search in files ignore file path/glob case on Windows and macOS#287018
Merged
Make Search in files ignore file path/glob case on Windows and macOS#287018
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new "Match File Path Case" toggle to the Search view's "files to include" input, allowing users to control whether file paths and glob patterns should be matched case-sensitively. The option defaults to on (case-sensitive) on Linux and off (case-insensitive) on Windows/Mac, aligning with OS file system conventions.
Changes:
- Adds
ignoreGlobCaseproperty throughout the search infrastructure (interfaces, query builders, search engines) - Implements UI toggle control in the include pattern input widget with appropriate default values per platform
- Updates ripgrep invocations to pass
--glob-case-insensitiveand--ignore-file-case-insensitiveflags when needed - Refactors chat context and explorer viewer search to use the glob's built-in case-insensitive matching instead of manual pattern transformation
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/search/browser/searchView.ts |
Integrates the new option into the search view UI, reads/saves state, and passes to query builder |
src/vs/workbench/contrib/search/browser/patternInputWidget.ts |
Adds the "Match File Path Case" toggle control to the include pattern input widget |
src/vs/workbench/services/search/common/search.ts |
Adds ignoreGlobCase property to IFolderQuery and ICommonQueryProps interfaces, updates path matching logic |
src/vs/workbench/services/search/common/searchExtTypes.ts |
Adds ignoreGlobCase to TextSearchProviderFolderOptions for search provider integration |
src/vs/workbench/services/search/common/queryBuilder.ts |
Propagates ignoreGlobCase option through query building process |
src/vs/workbench/services/search/common/textSearchManager.ts |
Passes ignoreGlobCase to text search provider options |
src/vs/workbench/services/search/common/fileSearchManager.ts |
Uses case-insensitive string comparison when ignoreGlobCase is set |
src/vs/workbench/services/search/node/ripgrepTextSearchEngine.ts |
Adds ripgrep flags for case-insensitive glob and ignore file matching |
src/vs/workbench/services/search/node/ripgrepFileSearch.ts |
Adds ripgrep flags for case-insensitive glob matching in file search |
src/vs/workbench/services/search/node/fileSearch.ts |
Updates FileWalker to use case-insensitive path comparisons and glob matching |
src/vs/workbench/services/search/worker/localFileSearch.ts |
Updates web worker file search to pass ignoreCase to glob operations and IgnoreFile constructor |
src/vs/workbench/contrib/search/browser/searchChatContext.ts |
Removes manual case-insensitive pattern transformation, uses built-in glob option |
src/vs/workbench/contrib/files/browser/views/explorerViewer.ts |
Removes manual case-insensitive pattern transformation, uses built-in glob option |
src/vs/workbench/contrib/chat/common/promptSyntax/utils/promptFilesLocator.ts |
Sets ignoreGlobCase: true for prompt file location queries |
Comments suppressed due to low confidence (1)
src/vs/workbench/services/search/common/search.ts:101
- Consider adding a documentation comment for the
ignoreGlobCaseproperty to improve code clarity. For example: "/** Whether to ignore case when matching file paths against glob patterns. */"
ignoreGlobCase?: boolean;
osortega
approved these changes
Jan 12, 2026
eli-w-king
pushed a commit
that referenced
this pull request
Jan 14, 2026
…ath-case Treat file paths (including glob patterns) as case-insensitive on Windows and macOS during search operation.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #10633
Treat file paths (including glob patterns) as case-insensitive on Windows and macOS during search operation.
Internal search usage is updated accordingly where possible to use the new option in the interfaces.
Public API endpoints are not updated in this PR.
ResourceGlobMatcher and related functionality is also not updated here.