← All posts

CLI

fzf: The Fuzzy Finder That Speeds Up Everything in Your Shell

fzf is a fast command-line fuzzy finder - filter files, git branches, shell history, and any list with a few keystrokes.

F CLI

You know the file is in there somewhere; you just don't remember the exact path. You know you ran that long command last week; you just can't reconstruct it. fzf is the answer to both, and to a hundred other "pick one from a list" moments in the terminal. It's a general-purpose fuzzy finder: give it any list on standard input, type a few characters, and it interactively narrows to what you meant - fast, even over hundreds of thousands of lines.

Fuzzy-Filter Any List

fzf's power is that it doesn't care what the list is. Files, branches, processes, container names - anything you can pipe, you can fuzzy-search:

# Fuzzy-find a file and open it vim $(fzf) # Pipe any list in to pick from it git branch | fzf # Enable the shell key bindings eval "$(fzf --bash)"

The Key Bindings You'll Use Daily

The shell integration adds three bindings that become muscle memory fast: Ctrl-T to insert a fuzzy-picked file path into the current command, Ctrl-R to fuzzy-search your command history, and Alt-C to fuzzy-cd into a subdirectory. Ctrl-R alone justifies the install.

Compose It With Anything

Because it reads stdin and writes stdout, fzf composes with every other tool - preview windows, custom commands, editor integrations, and plugins for shells and Vim all build on that one simple contract.

Rough Edges and Limitations

  • It filters, it doesn't understand. fzf matches text; pairing it with a smart source command (like a fast file finder) is where it shines.
  • Key bindings need setup. The one-time shell integration step is easy to forget.
  • Fuzzy can surprise you. On huge lists the top match isn't always the obvious one; a few more keystrokes disambiguate.
  • It's a building block. The real power comes from wiring it into your own aliases and functions.

fzf is one of those tools that quietly changes how you use the terminal - after a week of Ctrl-R, the old way feels broken.

Internal link suggestion: link "changes how you use the terminal" to the Zoxide post, its natural partner in a faster CLI setup.