All Projects → jhawthorn → Fzy

jhawthorn / Fzy

Licence: mit
🔍 A simple, fast fuzzy finder for the terminal

Programming Languages

c
50402 projects - #5 most used programming language
ruby
36898 projects - #4 most used programming language
Roff
2310 projects
shell
77523 projects
objective c
16641 projects - #2 most used programming language
Makefile
30231 projects

Projects that are alternatives of or similar to Fzy

Leaderf
An efficient fuzzy finder that helps to locate files, buffers, mrus, gtags, etc. on the fly for both vim and neovim.
Stars: ✭ 1,733 (-24.49%)
Mutual labels:  fuzzy-search, fuzzy, fuzzyfinder
Fzy.js
A javascript port of fzy's scoring algorithm. As seen on GitHub.com!
Stars: ✭ 82 (-96.43%)
Mutual labels:  fuzzy-search, fuzzy
Cross Platform Node Guide
📗 How to write cross-platform Node.js code
Stars: ✭ 1,161 (-49.41%)
Mutual labels:  cli, unix
Unix Permissions
Swiss Army knife for Unix permissions
Stars: ✭ 106 (-95.38%)
Mutual labels:  cli, unix
Luneta
command-line fuzzy finder
Stars: ✭ 49 (-97.86%)
Mutual labels:  cli, unix
Wsend
wsend: The opposite of wget
Stars: ✭ 64 (-97.21%)
Mutual labels:  cli, unix
Starred search
Fuzzy search your list of starred ★ repositories on GitHub
Stars: ✭ 89 (-96.12%)
Mutual labels:  cli, fuzzy-search
Flexsearch
Next-Generation full text search library for Browser and Node.js
Stars: ✭ 8,108 (+253.29%)
Mutual labels:  fuzzy-search, fuzzy
Trino
Trino: Master your translations with command line!
Stars: ✭ 118 (-94.86%)
Mutual labels:  cli, unix
Fzf
🌸 A command-line fuzzy finder
Stars: ✭ 40,965 (+1684.97%)
Mutual labels:  cli, unix
Ed
A modern UNIX ed (line editor) clone written in Go
Stars: ✭ 44 (-98.08%)
Mutual labels:  cli, unix
Enhancd
🚀 A next-generation cd command with your interactive filter
Stars: ✭ 2,049 (-10.72%)
Mutual labels:  cli, fuzzy-search
Scout
Friendly fuzzy finder made in rust
Stars: ✭ 43 (-98.13%)
Mutual labels:  cli, fuzzy-search
Alfred Fuzzy
Fuzzy search helper for Alfred 3+ workflows
Stars: ✭ 67 (-97.08%)
Mutual labels:  fuzzy-search, fuzzy
Fuzzy
Go library that provides fuzzy string matching optimized for filenames and code symbols in the style of Sublime Text, VSCode, IntelliJ IDEA et al.
Stars: ✭ 979 (-57.34%)
Mutual labels:  fuzzy-search, fuzzy
Imscript
a collection of small and standalone utilities for image processing, written in C
Stars: ✭ 86 (-96.25%)
Mutual labels:  cli, unix
Ipt
Interactive Pipe To: The Node.js cli interactive workflow
Stars: ✭ 783 (-65.88%)
Mutual labels:  cli, unix
Inquirer Checkbox Plus Prompt
Checkbox with autocomplete and other additions for Inquirer
Stars: ✭ 25 (-98.91%)
Mutual labels:  cli, fuzzy-search
Iterfzf
Pythonic interface to fzf, a CLI fuzzy finder
Stars: ✭ 106 (-95.38%)
Mutual labels:  cli, fuzzy-search
Cbox
convert any python function to unix-style command
Stars: ✭ 154 (-93.29%)
Mutual labels:  cli, unix

fzy

fzy is a fast, simple fuzzy text selector for the terminal with an advanced scoring algorithm.

Try it out online!

It's been kind of life-changing. -@graygilmore
fzy works great btw -@alexblackie

Build Status

Why use this over fzf, pick, selecta, ctrlp, ...?

fzy is faster and shows better results than other fuzzy finders.

Most other fuzzy matchers sort based on the length of a match. fzy tries to find the result the user intended. It does this by favouring matches on consecutive letters and starts of words. This allows matching using acronyms or different parts of the path.

A gory comparison of the sorting used by fuzzy finders can be found in ALGORITHM.md

fzy is designed to be used both as an editor plugin and on the command line. Rather than clearing the screen, fzy displays its interface directly below the current cursor position, scrolling the screen if necessary.

Installation

macOS

Using Homebrew

brew install fzy

Using MacPorts

sudo port install fzy

Arch Linux/MSYS2: pacman -S fzy

FreeBSD: pkg install fzy

Gentoo Linux: emerge -av app-shells/fzy

Ubuntu/Debian: apt-get install fzy

pkgsrc (NetBSD and others): pkgin install fzy

openSUSE: zypper in fzy

From source

make
sudo make install

The PREFIX environment variable can be used to specify the install location, the default is /usr/local.

Usage

fzy is a drop in replacement for selecta, and can be used with its usage examples.

Use with Vim

fzy can be easily integrated with vim.

function! FzyCommand(choice_command, vim_command)
  try
    let output = system(a:choice_command . " | fzy ")
  catch /Vim:Interrupt/
    " Swallow errors from ^C, allow redraw! below
  endtry
  redraw!
  if v:shell_error == 0 && !empty(output)
    exec a:vim_command . ' ' . output
  endif
endfunction

nnoremap <leader>e :call FzyCommand("find . -type f", ":e")<cr>
nnoremap <leader>v :call FzyCommand("find . -type f", ":vs")<cr>
nnoremap <leader>s :call FzyCommand("find . -type f", ":sp")<cr>

Any program can be used to filter files presented through fzy. ag (the silver searcher) can be used to ignore files specified by .gitignore.

nnoremap <leader>e :call FzyCommand("ag . --silent -l -g ''", ":e")<cr>
nnoremap <leader>v :call FzyCommand("ag . --silent -l -g ''", ":vs")<cr>
nnoremap <leader>s :call FzyCommand("ag . --silent -l -g ''", ":sp")<cr>

Sorting

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

See Also

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].