PRIMARY CATEGORIES β†’ DESKTOP SETUPΒ Β β€’Β Β SERVER SETUP

FZF β†’ A General-Purpose Command-Line Fuzzy Finder πŸ”Ž

It is an interactive Text Filter program for any kind of list such as β†’

  • Files

  • Command History β†’ C-R

  • System Processes β†’ Tab

  • SSH Connections β†’ Tab

References πŸ›ˆ

Github Repository

FZF Documentation

Check this out too


Installation

Reference

Clone the Github Repository and run the Install Script as follows β†’

git clone --depth 1 https://github.com/junegunn/fzf.git ~/.fzf
~/.fzf/install

That’s it!

$ command -V fzf
fzf is /home/al3xbb/.fzf/bin/fzf

To enable some handy features of FZF, add the following lines in the .zshrc file β†’

File Preview with BAT

~/.zshrc
export FZF_DEFAULT_OPTS="--height 40% --border --preview 'bat --color=always {} 2> /dev/null'"

The above one modifies the FZF’s Display Format and enables File Preview Mode with BAT

FD instead of Find

~/.zshrc
export FZF_DEFAULT_COMMAND="fd --type f"

Repeat all the above steps as Root



Shortcuts

Shorcuts’ Meaning
KeyMeaning
CControlC-c β†’ Control+c
MAltM-a β†’ Alt+a
SShiftS-o β†’ Shift+o
SuperWindowsSuper-s β†’ Windows+s
ReturnEnterC-S-Return β†’ Control+Shift+Enter
-+C-z β†’ Control+z
{a,b,c,d}a b c dC-{a,b,c,d} β†’ C-a C-b C-c C-d
Reverse History
ActionShortcut
ToogleC-r
Up/DownC-k C-j
C-p C-n
Select ItemReturn
ExitC-g C-c Esc
Mark Items Backward/Forward
(Multiselect Mode)
TAB S-TAB
Others
ActionShortcut
File SelectionC-t
cd-like MovementM-c
Autocomplete** + TAB

Integration

FZF supports integrations with some Tools and Functionalities such as β†’

Nvim/Vim/Vi
$ nvim $( fzf )

Bat/Cat
$ bat $( fzf )