-
-
Notifications
You must be signed in to change notification settings - Fork 2k
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
smart-case sensitivity is fooled by brackets in search pattern #229
Comments
I see. Under what circumstances should an uppercase literal be detected? Would |
Some more thoughts on this.
(2) is actually slightly tricky to implement because the regex parser is a bit too ambitious. e.g., After parsing, there's no actual way to distinguish This is kind of why I hate the smart case feature and why it's not the default. In the simple case, it has nice behavior, but when your regex grows beyond literals, its behavior becomes unclear and less intuitive. In the absence of input from others, I think I'd like to just implement rule (1) and call it a day. It would, for example, work in @ngirard's case. |
As title says, the case sensivity is not respected any more when the search pattern contains capitals within brackets.
As an example,
rg --smart-case '[EÉ]conomie'
returns also lowercase matches ("economie").
The text was updated successfully, but these errors were encountered: