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 π
Check this out too
Installation
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
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
export FZF_DEFAULT_COMMAND="fd --type f"
Repeat all the above steps as Root
IMPORTANT
Note that the above actions require Bat and FD to be installed in the system
Shortcuts
Shorcutsβ Meaning
Key | Meaning | |
---|---|---|
C | Control | C-c β Control+c |
M | Alt | M-a β Alt+a |
S | Shift | S-o β Shift+o |
Super | Windows | Super-s β Windows+s |
Return | Enter | C-S-Return β Control+Shift+Enter |
- | + | C-z β Control+z |
{a,b,c,d} | a b c d | C-{a,b,c,d} β C-a C-b C-c C-d |
Reverse History
Action | Shortcut |
---|---|
Toogle | C-r |
Up/Down | C-k C-j C-p C-n |
Select Item | Return |
Exit | C-g C-c Esc |
Mark Items Backward/Forward (Multiselect Mode) | TAB S-TAB |
Others
Action | Shortcut |
---|---|
File Selection | C-t |
cd-like Movement | M-c |
Autocomplete | ** + TAB |
Integration
FZF supports integrations with some Tools and Functionalities such as β
Nvim/Vim/Vi
$ nvim $( fzf )
Bat/Cat
$ bat $( fzf )