ohmyzsh/plugins/fzf
2025-05-24 13:53:50 +03:00
..
fzf.plugin.zsh feat(fzf): add support for Fedora package (#12421) 2024-05-15 19:14:11 +02:00
README.md docs(fzf): improved documentation 2025-05-24 13:53:50 +03:00

fzf

The fzf plugin automatically configures fzf, a general-purpose command-line fuzzy finder. This plugin enables interactive fuzzy search, auto-completion, and key bindings for a more efficient shell experience. It detects your platform and attempts to automatically source the necessart fzf scripts, enabling features like CTRL-T, CTRL-R, and ALT-C.

To use it, add fzf to the plugins array in your .zshrc file:

plugins=(... fzf)

Make sure you have fzf installed before enabling this plugin.

Settings

All variables should be defined before Oh My Zsh is sourced in your .zshrc file.

FZF_BASE

If fzf is installed in a non-standard location, you can manually specift the base installation directory by setting:

export FZF_BASE=/path/to/fzf

The plugin will look for shell integration files under $FZF_BASE/shell, or $FZF_BASE directly.

FZF_DEFAULT_COMMAND

This variable defines the default command used by fzf when there is no piped input (e.g., when used with CTRL-T).

You can cutomize it:

export FZF_DEFAULT_COMMAND='fd --type f --hidden --exlude .git'

If not defined, the plugin will automatically set it to the first available tool in the following priority:

These tools allow for fast, filesystem-aware searches and greatly improve fzf performance.

DISABLE_FZF_AUTO_COMPLETION

If you do not want fzf to override or enchance Zsh's auto-completion, disable it by setting:

DISABLE_FZF_AUTO_COMPLETION="true"

Auto-completion provides fuzzy matches for commands, files, and directories.

DISABLE_FZF_KEY_BINDINGS

To disable the key bindings provided by fzf, set:

DISABLE_FZF_KEY_BINDINGS="true"

Key bindings enabled by default:

  • CTRL-T: Paste selected file path(s)
  • CTRL-R: Search command history
  • ALT-C: Change to selected directory