search: Support brace syntax in project search include/exclude patterns #47860
Conversation
0dc6ec3 to
86fc3c9
Compare
|
Hi @MrSubidubi how are you today? |
|
|
||
| for (index, char) in text.char_indices() { | ||
| match char { | ||
| '{' => brace_depth += 1, |
There was a problem hiding this comment.
I think, escaping should be taken into account, for {, } and ,
See bash documentation:
A ‘{’ or ‘,’ may be quoted with a backslash to prevent its being considered part of a brace expression.
Source: https://www.gnu.org/software/bash/manual/html_node/Brace-Expansion.html
There was a problem hiding this comment.
I updated, please review again
This comment was marked as spam.
This comment was marked as spam.
Thank you, is this good to merge? |
I'm not part of the project. You'll need an approve from a reviewer |
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Thank you a lot both of you for the cooperation, this looks very finished now, happy to merge.
|
Thank you for merging, @SomeoneToIgnore |
|
Feel free to work on anything you want to change, without the assignment, that's also perfectly fine. |
Auto-applied queued documentation suggestions from: - PR #48908 - PR #48909 - PR #48910 - PR #48912 - PR #48930 - PR #44794 - PR #48763 - PR #45073 - PR #48495 - PR #49374 - PR #49139 - PR #48780 - PR #48619 - PR #48978 - PR #48962 - PR #48988 - PR #47860 - PR #49015 - PR #47095 - PR #47475 - PR #48542 - PR #46766 - PR #47754 - PR #48807 - PR #44506 - PR #49051 - PR #49069 - PR #48842 - PR #48851 - PR #48736 - PR #47673 - PR #49094 - PR #49098 - PR #49622 Generated with script/docs-suggest-publish for human review in draft PR.
Auto-applied queued documentation suggestions from: - PR #48908 - PR #48909 - PR #48910 - PR #48912 - PR #48930 - PR #44794 - PR #48763 - PR #45073 - PR #48495 - PR #49374 - PR #49139 - PR #48780 - PR #48619 - PR #48978 - PR #48962 - PR #48988 - PR #47860 - PR #49015 - PR #47095 - PR #47475 - PR #48542 - PR #46766 - PR #47754 - PR #48807 - PR #44506 - PR #49051 - PR #49069 - PR #48842 - PR #48851 - PR #48736 - PR #47673 - PR #49094 - PR #49098 - PR #49622 - PR #49554 - PR #49710 - PR #49716 - PR #49732 - PR #49788 - PR #49876 - PR #49902 - PR #49910 - PR #49390 - PR #50027 Generated with script/docs-suggest-publish for human review in draft PR.
Auto-applied documentation from: - PR #48619: agent single_file_review default change - PR #48978: enriched symbol names in outline - PR #49015: audio device selection for collab - PR #47095: MCP error handling - PR #47475: OpenRouter default model requirement Skipped (already documented): - PR #49139, PR #48780, PR #48988, PR #47860
Auto-applied queued documentation suggestions from: - PR #48908 - PR #48909 - PR #48910 - PR #48912 - PR #48930 - PR #44794 - PR #48763 - PR #45073 - PR #48495 - PR #49374 - PR #49139 - PR #48780 - PR #48619 - PR #48978 - PR #48962 - PR #48988 - PR #47860 - PR #49015 - PR #47095 - PR #47475 - PR #48542 - PR #46766 - PR #47754 - PR #48807 - PR #44506 - PR #49051 - PR #49069 - PR #48842 - PR #48851 - PR #48736 - PR #47673 - PR #49094 - PR #49098 - PR #49622 - PR #49554 - PR #49710 - PR #49716 - PR #49732 - PR #49788 - PR #49876 - PR #49902 - PR #49910 - PR #49390 - PR #50027 Generated with script/docs-suggest-publish for human review in draft PR.
Auto-applied documentation from: - PR #48619: agent single_file_review default change - PR #48978: enriched symbol names in outline - PR #49015: audio device selection for collab - PR #47095: MCP error handling - PR #47475: OpenRouter default model requirement Skipped (already documented): - PR #49139, PR #48780, PR #48988, PR #47860
Closes #47527
Summary
The include/exclude filters in Project Search now support standard glob brace syntax like
{a,b}.Before:
crates/{search,project}/**/file.rswould error with "unclosed alternate group"After: Pattern correctly matches files in both
crates/search/andcrates/project/Implementation
Added
split_glob_patterns()function that splits by comma only when not inside braces, preserving the{a,b}syntax thatglobsetnatively supports.Release Notes:
{a,b}glob syntax in project search include/exclude filtersHere is the screenshot of before and after.
Before:

After:
