Cette page est affichée en anglais. Une traduction française est en cours.
SkillsApr 11, 2026·2 min de lecture

fzf — Blazing Fast Command-Line Fuzzy Finder

fzf is a general-purpose command-line fuzzy finder written in Go. Blazing fast, portable, and composable with any list-producing command. Interactive picker for files, commands, history, git branches, processes, and more.

Prêt pour agents

Installation agent prête

Cet actif peut être installé après choix du runtime, vérification du plan et exécution de la commande adaptée.

Native · 98/100Policy : autoriser
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
step-1.md
Commande d'installation directe
npx -y tokrepo@latest install 85b6bab1-35bd-11f1-9bc6-00163e2b0d79 --target codex

À exécuter après confirmation du plan en dry-run.

TL;DR
fzf is a Go-based fuzzy finder that turns any list into an interactive, searchable picker for files, history, git branches, and more.
§01

What it is

fzf is a general-purpose command-line fuzzy finder written in Go. It reads any list from stdin and presents an interactive fuzzy search interface. You type a partial match, and fzf instantly narrows the list. It works with files, command history, git branches, processes, environment variables, and any command that produces text output.

fzf targets anyone who works in the terminal. It integrates with bash, zsh, and fish shells to enhance Ctrl+R history search, file finding, and directory navigation. The tool is composable with any Unix command through pipes.

§02

How it saves time or tokens

fzf replaces manual searching through long command histories, directory trees, and process lists. Instead of typing exact names, you type partial fragments and fzf finds matches instantly. Shell integration replaces the default Ctrl+R with a fuzzy-searchable history. The preview window shows file contents or command details without leaving the picker.

§03

How to use

  1. Install fzf: brew install fzf on macOS, sudo apt install fzf on Ubuntu, or clone from GitHub.
  2. Run fzf in any directory to fuzzy-find files, or pipe any command output to fzf.
  3. Enable shell integration for enhanced Ctrl+R, Ctrl+T, and Alt+C keybindings.
§04

Example

# Interactive file finder
fzf

# Search command history (with shell integration)
# Press Ctrl+R to activate

# Find and open a file in vim
vim $(fzf)

# Git branch checkout with preview
git branch | fzf --preview 'git log --oneline {}' | xargs git checkout

# Kill a process interactively
ps aux | fzf | awk '{print $2}' | xargs kill

# Find files with preview
fzf --preview 'cat {}' --preview-window=right:60%

# Combine with ripgrep for content search
rg --files | fzf --preview 'head -50 {}'
§05

Related on TokRepo

§06

Common pitfalls

  • Shell integration must be explicitly enabled after installation. Run the install script or source the keybinding files in your shell config.
  • fzf uses an external file finder (find or fd) for directory traversal. Install fd for faster file finding and better .gitignore support.
  • The default fzf command searches the current directory recursively. In large directories, set FZF_DEFAULT_COMMAND to use fd or rg for faster results.

Questions fréquentes

How do I enable fzf shell integration?+

After installing fzf, run the install script that enables keybindings: ~/.fzf/install or eval $(fzf --bash) in .bashrc. This adds Ctrl+R for history search, Ctrl+T for file finding, and Alt+C for directory jumping.

Can fzf work with any command output?+

Yes. Pipe any command to fzf and it becomes an interactive picker. Examples: docker ps | fzf, kubectl get pods | fzf, env | fzf. Any text list works.

What is the preview window?+

The --preview flag runs a command for the currently highlighted item and displays the output in a split pane. Use it to preview file contents, git diffs, or command help without leaving the picker.

How does fzf compare to dmenu or rofi?+

fzf is a terminal-based fuzzy finder, while dmenu and rofi are graphical menu selectors. fzf integrates with shell workflows and pipes. dmenu/rofi are better for desktop launcher use cases.

Does fzf support multiple selection?+

Yes. Use the -m flag to enable multi-select mode. Press Tab to select items and Enter to confirm. The selected items are output one per line.

Sources citées (3)
  • fzf GitHub— fzf is a general-purpose fuzzy finder written in Go
  • fzf README— fzf shell integration and keybinding configuration
  • fzf Wiki— Command-line productivity tools and fuzzy finding

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires