fzf
Reads lines on stdin, lets you fuzzy-select interactively, writes the choice to stdout.
What it does
fzf is a filter with a UI. Anything that produces lines can be piped into it, and the selection piped onward — which is why it ends up underneath dozens of other tools’ interactive modes.
Its shell integration rebinds three keys: Ctrl-T inserts a file path, Ctrl-R searches history, and Alt-C changes directory. **<Tab> completes paths fuzzily.
# preview a file while selecting it
fzf --preview 'bat --color=always {}'
# check out a branch
git branch -a | fzf | xargs git switchNotes
Add eval "$(fzf --zsh)" to ~/.zshrc for the key bindings and completion. FZF_DEFAULT_OPTS sets layout and preview defaults globally.
Alternative to
| Alternative | Type | Trade-off |
|---|---|---|
skim (sk) | Open source | A Rust reimplementation with near-identical flags |
| fzy and peco | Open source | Smaller and simpler, fewer features |
| Telescope | Open source | The same idea, but only inside Neovim |
Install
brew install fzf