2018-09-05 04:25:45 +08:00
|
|
|
# fzf
|
|
|
|
|
2020-10-21 05:48:59 +08:00
|
|
|
This plugin tries to find [junegunn's fzf](https://github.com/junegunn/fzf) based on where
|
|
|
|
it's been installed, and enables its fuzzy auto-completion and key bindings.
|
2018-09-05 04:25:45 +08:00
|
|
|
|
2020-09-05 04:13:45 +08:00
|
|
|
To use it, add `fzf` to the plugins array in your zshrc file:
|
2020-10-21 05:48:59 +08:00
|
|
|
|
2020-09-05 04:13:45 +08:00
|
|
|
```zsh
|
|
|
|
plugins=(... fzf)
|
|
|
|
```
|
|
|
|
|
|
|
|
## Settings
|
|
|
|
|
2020-10-21 05:48:59 +08:00
|
|
|
All these settings should go in your zshrc file, before Oh My Zsh is sourced.
|
|
|
|
|
|
|
|
### `FZF_BASE`
|
|
|
|
|
|
|
|
Set to fzf installation directory path:
|
|
|
|
|
|
|
|
```zsh
|
|
|
|
export FZF_BASE=/path/to/fzf/install/dir
|
|
|
|
```
|
|
|
|
|
|
|
|
### `FZF_DEFAULT_COMMAND`
|
|
|
|
|
|
|
|
Set default command to use when input is tty:
|
2020-09-05 04:13:45 +08:00
|
|
|
|
2018-09-05 04:25:45 +08:00
|
|
|
```zsh
|
2021-12-01 19:20:31 +08:00
|
|
|
export FZF_DEFAULT_COMMAND='<your fzf default command>'
|
2020-10-21 05:48:59 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
If not set, the plugin will try to set it to these, in the order in which they're found:
|
2020-09-05 04:13:45 +08:00
|
|
|
|
2020-10-21 05:48:59 +08:00
|
|
|
- [`rg`](https://github.com/BurntSushi/ripgrep)
|
|
|
|
- [`fd`](https://github.com/sharkdp/fd)
|
|
|
|
- [`ag`](https://github.com/ggreer/the_silver_searcher)
|
2018-09-05 04:25:45 +08:00
|
|
|
|
2020-10-21 05:48:59 +08:00
|
|
|
### `DISABLE_FZF_AUTO_COMPLETION`
|
2018-09-05 04:25:45 +08:00
|
|
|
|
2020-10-21 05:48:59 +08:00
|
|
|
Set whether to load fzf auto-completion:
|
|
|
|
|
|
|
|
```zsh
|
|
|
|
DISABLE_FZF_AUTO_COMPLETION="true"
|
2018-09-05 04:25:45 +08:00
|
|
|
```
|
2020-09-05 04:13:45 +08:00
|
|
|
|
2020-10-21 05:48:59 +08:00
|
|
|
### `DISABLE_FZF_KEY_BINDINGS`
|
|
|
|
|
|
|
|
Set whether to disable key bindings (CTRL-T, CTRL-R, ALT-C):
|
|
|
|
|
|
|
|
```zsh
|
|
|
|
DISABLE_FZF_KEY_BINDINGS="true"
|
|
|
|
```
|