It would be great to have a fuzzy search in emerge because when you search a program and don't know it's exact name, you cannot find it with emerge.
Example: maybe you want to find "gkrellkam" but don't know it's name, so you're searching for gkrellm and cam and both searches will not find it.
The only way is a manual search in x11-plugins.
Furtheron it would be nice to have AND+OR+NOT+ONLY search-parameters like:
emerge -s gettext NOT ruby
emerge -s http ONLY perl
i feel like everything could be handled with a regexp (which emerge -s supports)
I'd like to implement this. We've already got fuzzy package name search build into the ambiguous package name response, using difflib.
(In reply to SpanKY from comment #1)
> i feel like everything could be handled with a regexp (which emerge -s
In comparison, fuzzy search is effortless for users.
Using the difflib.get_close_matches function as an example, we can use the SequenceMatcher.ratio() method to measure how similar a package name is to the given search string. We can have options to specify cutoff ratio and maximum number of close matches to return. If a maximum number of matches is specified, it is not be possible to display fuzzy results incrementally, though exact matches can still be displayed incrementally (bug 412471).
There's a patch in the following branch:
I've posted it for review here:
Patch updated and posted for review:
This is in the master branch:
Fixed in portage-2.3.3.