Skip to content

Shivix/fp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fp

fp is heavily based on fzy.

fp showcase

Why use this over fzy, fzf, pick, skim, etc?

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)

Installation

$ make install
# Only has fish completion right now.
$ make install-completion

Usage

fp 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 -1

Sorting

fp 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.

About

A zig based simple and lightweight fp with great matching and speed.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors