658 B
658 B
Fuzzy finder
Setup
- Install using your distro package manager (
sudo pacman -S fzf) - Add following lines to your .bashrc or .zshrc configuration:
eval "$(fzf --bash)"orsource <(fzf --zsh)
Usage
- Default call of
fzfwill start fuzzy search on your filesystem - Use --preview flag to display content of the file in program of your choice:
fzf --preview="bat {} --color=always"
- To open selected file in nvim use
$()like this:nvim $(fzf --preview="bat {} --color=always") - You can do more complex stuff like this:
alias hist="history | awk '{for (i=2; i<=NF; i++) printf \$i\" \"; print \"\"}' | fzf | wl-copy"