fp is heavily based on fzy.
It's much simpler and lighter weight that most fuzzy finders. If you need the features that these others provide then stop right here, however you'd be surprised how little you truly need.
Most other fuzzy matchers sort based on the length of a match. fp favours matches on consecutive letters and starts of words. This allows matching using acronyms or different parts of the path.
fp is designed to be used both as an editor plugin and on the command line. Rather than clearing the screen, fp displays its interface directly below the current cursor position, scrolling the screen if necessary.
As for why use it over Fzy? If you're already using it and are happy with it then stick to it, but I intend to keep fp well maintained and there are a couple differences which you may prefer such as:
- support for multiple selections, akin to fzf's --multi but works by default.
- single threaded (less hardware usage and still faster in most cases)
$ make install
# Only has fish completion right now.
$ make install-completionfp is purely a picker, it must be fed data to pick from.
# Search through local files
fd | fp
# Narrow down a grep line
rg test | fp
# Can be used non-interactively to add fuzzy finding where you wouldn't other wise.
fp -e "fuzzypattern" <file.txt | head -1fp attempts to present the best matches first. The following considerations are weighted when sorting:
It prefers consecutive characters: file will match file over filter.
It prefers matching the beginning of words: amp is likely to match app/models/posts.rb.
It prefers shorter matches: abce matches abcdef over abc de.
It prefers shorter candidates: test matches tests over testing.
