17 lines
658 B
Markdown
17 lines
658 B
Markdown
# 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)"` or `source <(fzf --zsh)`
|
|
|
|
## Usage
|
|
|
|
- Default call of `fzf` will start fuzzy search on your filesystem
|
|
- Use **--preview** flag to display content of the file in program of your choice:
|
|
```bash
|
|
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"`
|