beets
beets copied to clipboard
Make fuzzy search ignore case by default
Proposed solution
string_match
method for FuzzyQuery
should ignore case by making both pattern and value being matched against lowercase.
Objective
Goals
Make fuzzy searching... fuzzier. I don't see a scenario where one would want a fuzzy search but care about capitalization.
Alternative would be to make this behavior toggleable in the config or to have a different prefix for case sensitive vs case-insensitive fuzzy matching.
Non-goals
N/A
Anti-goals
This could result in unexpected behavior if a user depends on capitalization during fuzzy searching, but I don't see why one would.
To be on the safe side, it might work similar to "smart case" in vim: it's ignoring case by default (assuming user's input is lowercased usually), but as soon as user put the uppercased char, case won't be ignored anymore.
Smartcase is the current behavior, but I don't think I agree with it.
We are already fuzzy-searching, so the situations where the user would care about case seem quite rare. It's far more likely that they wouldn't care, and that smartcase would just make things more confusing.