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
CTRL-T file picker
# Press CTRL-T in an fzf-enabled shell

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

CTRL-R history search
# Press CTRL-R in an fzf-enabled shell

# Search shell history interactively.

ALT-C directory jump
# Press ALT-C in an fzf-enabled shell

# Fuzzy-pick a directory and change into it.

Customize CTRL-R history search
export FZF_CTRL_R_OPTS='--layout=reverse --height=60% --border'

# Add inline previews or change layout for history search.

Change how ALT-C lists directories
export FZF_ALT_C_COMMAND='fd --type d --hidden --follow --exclude .git'

# Use fd for faster directory discovery.

## Fuzzy completion
Fuzzy-complete SSH hosts or paths
ssh **<TAB>

# Use shell completion hooks supplied by fzf.

Point completion at a custom source
_fzf_compgen_path() { fd --hidden --follow --exclude .git . "$1"; }

# Use a shell function or command to drive completion input.

Recommended next

No recommendations yet.