Fzf: Difference between revisions

From NixOS Wiki
update fzf shell integration
Granddave (talk | contribs)
m Add links to Zsh, Fish and add Shell category
Line 13: Line 13:


== zsh ==
== zsh ==
To enable fzf in zsh add the following line to .zshrc
To enable fzf in [[zsh]] add the following line to .zshrc


<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
Line 20: Line 20:


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


<syntaxhighlight lang="fish">
<syntaxhighlight lang="fish">
Line 37: Line 37:


[[Category:Applications]]
[[Category:Applications]]
[[Category:Shell]]

Revision as of 13:47, 16 December 2024

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 .bashrc

eval "$(fzf --bash)"

zsh

To enable fzf in zsh add the following line to .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