Fzf: Difference between revisions
Appearance
update fzf shell integration |
m style fixes and minor corrections |
||
| (4 intermediate revisions by 3 users not shown) | |||
| Line 7: | Line 7: | ||
First install <code>fzf</code> in your profile, then use one of the following methods: | First install <code>fzf</code> in your profile, then use one of the following methods: | ||
== bash == | == Bash == | ||
To enable fzf in bash add the following line to .bashrc | === With Home-manager === | ||
There is an option to enable fzf bash integration: | |||
<syntaxhighlight lang="nix"> | |||
programs.fzf.enableBashIntegration = true; | |||
</syntaxhighlight> | |||
=== Without Home-manager === | |||
To enable fzf in bash add the following line to <code>$HOME/.bashrc</code>: | |||
<syntaxhighlight lang="bash">eval "$(fzf --bash)"</syntaxhighlight> | <syntaxhighlight lang="bash">eval "$(fzf --bash)"</syntaxhighlight> | ||
== zsh == | == Zsh == | ||
To enable fzf in zsh add the following line to .zshrc | You can enable fzf in [[zsh]]. | ||
=== With Home-manager === | |||
There is an option to enable fzf zsh integration: | |||
<syntaxhighlight lang="nix"> | |||
programs.fzf.enableZshIntegration = true; | |||
</syntaxhighlight> | |||
=== Without Home-manager === | |||
To enable fzf in zsh add the following line to <code>$HOME/.zshrc</code>: | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
eval "$(fzf --zsh)" | eval "$(fzf --zsh)" | ||
</syntaxhighlight> | </syntaxhighlight> | ||
== fish == | == Fish == | ||
To enable fzf in fish | To enable fzf in [[fish]]. | ||
=== With Home-manager === | |||
There is an option to enable fzf fish integration: | |||
<syntaxhighlight lang="nix"> | |||
programs.fzf.enableFishIntegration = true; | |||
</syntaxhighlight> | |||
=== Without Home-Manager === | |||
To enable fzf in fish add the following line to <code>$HOME/.config/fish/functions/fish_user_key_bindings.fish</code>: | |||
<syntaxhighlight lang="fish"> | <syntaxhighlight lang="fish"> | ||
| Line 32: | Line 50: | ||
You can interactively search the list of available packages with: | You can interactively search the list of available packages with: | ||
<syntaxhighlight lang= | <syntaxhighlight lang=console> | ||
nix-env -qa | fzf | $ nix-env -qa | fzf | ||
</syntaxhighlight> | </syntaxhighlight> | ||
[[Category:Applications]] | [[Category:Applications]] | ||
[[Category:Shell]] | |||
Latest revision as of 14:29, 19 July 2026
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
With Home-manager
There is an option to enable fzf bash integration:
programs.fzf.enableBashIntegration = true;
Without Home-manager
To enable fzf in bash add the following line to $HOME/.bashrc:
eval "$(fzf --bash)"
Zsh
You can enable fzf in zsh.
With Home-manager
There is an option to enable fzf zsh integration:
programs.fzf.enableZshIntegration = true;
Without Home-manager
To enable fzf in zsh add the following line to $HOME/.zshrc:
eval "$(fzf --zsh)"
Fish
To enable fzf in fish.
With Home-manager
There is an option to enable fzf fish integration:
programs.fzf.enableFishIntegration = true;
Without Home-Manager
To enable fzf in fish add the following line 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