Skip to content

Make Search in files ignore file path/glob case on Windows and macOS#287018

Merged
dmitrivMS merged 4 commits intomainfrom
dev/dmitriv/search-ignore-path-case
Jan 12, 2026
Merged

Make Search in files ignore file path/glob case on Windows and macOS#287018
dmitrivMS merged 4 commits intomainfrom
dev/dmitriv/search-ignore-path-case

Conversation

@dmitrivMS
Copy link
Contributor

@dmitrivMS dmitrivMS commented Jan 11, 2026

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.

Copilot AI review requested due to automatic review settings January 11, 2026 17:33
@dmitrivMS dmitrivMS added search Search widget and operation issues file-glob File glob engine labels Jan 11, 2026
@dmitrivMS dmitrivMS self-assigned this Jan 11, 2026
@dmitrivMS dmitrivMS requested review from bpasero and osortega January 11, 2026 17:33
@vs-code-engineering vs-code-engineering bot added this to the January 2026 milestone Jan 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 ignoreGlobCase property 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-insensitive and --ignore-file-case-insensitive flags 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 ignoreGlobCase property to improve code clarity. For example: "/** Whether to ignore case when matching file paths against glob patterns. */"
	ignoreGlobCase?: boolean;

@dmitrivMS dmitrivMS enabled auto-merge January 12, 2026 14:36
@dmitrivMS dmitrivMS changed the title Added option in Search view to ignore case in file paths and glob patterns Make Search in files ignore file path/glob case on Windows and macOS Jan 12, 2026
@dmitrivMS dmitrivMS merged commit 0d89aca into main Jan 12, 2026
22 checks passed
@dmitrivMS dmitrivMS deleted the dev/dmitriv/search-ignore-path-case branch January 12, 2026 16:37
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.
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Feb 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

file-glob File glob engine search Search widget and operation issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Glob matching should be case insensitive

4 participants