-
-
Notifications
You must be signed in to change notification settings - Fork 227
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
case insensitive exact content search #546
Comments
There are two kinds of content searches:
Is there a reason for not using |
@Canop thanks for your reply! Using
This is much nicer with smartcasing. Smartcasing was also what I intuitively expected Is there any use case where a "smartcased" As to performance, is case-insensitiveness a big performance problem for content search? I'd have though there should be ways to make case insensitive search fast, e.g. lowercasing the searched file contents (should be O(n) I guess, but haven't measured actual performance of lowercasing). I'd be happy to research this, if you think it's a problem. |
OK, I understand why you don't find I won't change the existing fast content search |
Searching in file names is case-insensitive by default. Searching content with
c/
is case-sensitive by default.Intuitively, I'd have expected
c/
to also be case insensitive. Adding/i
at the end does not turn on case sensitivity as it does forcr/
.broot 1.11.1 on Ubuntu
Suggestions
I see several possible solutions (the one I like most ordered first):
c/
could be "smart" by default, like vim withset smartcase
: If all chars are lowercase in the search, search case-insensitively. If at least one is uppercase, search case-sensitively. This works very well for me in vim, matches my intuitive expectation and makes it trivial to turn on case sensitive searchc/
could be case insensitive by defaultc/
should at least accept the/i
flag thatcr/
accepts to turn case-sensitivity offThe text was updated successfully, but these errors were encountered: