fzf Shell Completion and Key Bindings

Set up fuzzy shell completion and customize built-in key bindings like CTRL-T, CTRL-R, and ALT-C.

View
StandardDetailedCompact
Export
Copy the compact sheet, download it, or print it.
Download
`D` dense toggle · `C` copy all

Shell key bindings

Use the built-in shell bindings for files, history, and directories.

CTRL-T file picker

Trigger the built-in file picker from the command line.

textANYctrl-tfilesshell
text
# Press CTRL-T in an fzf-enabled shell
Notes

With shell integration enabled, CTRL-T pastes selected paths into the current command line.

CTRL-R history search

Search shell history interactively.

textANYctrl-rhistoryshell
text
# Press CTRL-R in an fzf-enabled shell
Notes

This is often one of the most-used shell integrations because it makes command recall much faster.

ALT-C directory jump

Fuzzy-pick a directory and change into it.

textANYalt-ccddirectories
text
# Press ALT-C in an fzf-enabled shell
Notes

Great for navigating large projects or frequently visited directories.

Customize CTRL-R history search

Add inline previews or change layout for history search.

bashANYctrl-roptshistory
bash
export FZF_CTRL_R_OPTS='--layout=reverse --height=60% --border'
Notes

Lets you give history search a different feel than file selection.

Change how ALT-C lists directories

Use fd for faster directory discovery.

bashANYalt-cfddirectories
bash
export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git'
Notes

Useful on large repositories and dotfile-heavy environments.

Fuzzy completion

Wire fzf into shell completion for files, hosts, variables, and custom completions.

Fuzzy-complete SSH hosts or paths

Use shell completion hooks supplied by fzf.

textANYcompletionsshshell
text
ssh **<TAB>
Notes

With the integration loaded, supported completions can open an fzf selector instead of a plain completion list.

Point completion at a custom source

Use a shell function or command to drive completion input.

bashANYcompletioncustomfd
bash
_fzf_compgen_path() { fd --hidden --follow --exclude .git . "$1"; }
Notes

Advanced shell users often override the default generators for better performance.

Recommended next

No recommendations yet.