fzf

From NixOS Wiki
Revision as of 13:54, 16 December 2024 by Granddave (talk | contribs) (Capitalize shells and make config paths look similar)

fzf is a general-purpose command-line fuzzy finder.

Shell extensions

fzf provides additional key bindings (CTRL-T, CTRL-R, and ALT-C) for shells

First install fzf in your profile, then use one of the following methods:

Bash

To enable fzf in bash add the following line to $HOME/.bashrc

eval "$(fzf --bash)"

Zsh

To enable fzf in zsh add the following line to $HOME/.zshrc

eval "$(fzf --zsh)"

Fish

To enable fzf in fish, add the following to $HOME/.config/fish/functions/fish_user_key_bindings.fish

fzf --fish | source

Examples

Search all nix packages

You can interactively search the list of available packages with:

nix-env -qa | fzf