Auto trigger history search in terminal using fzf (fuzzy finder)
7,470
This is described in the original GitHub repository. In case you are using homebrew
you'll just need to type $(brew --prefix)/opt/fzf/install
and configure it the way you like. The script will create two files and ask you to update your shell configuration files. For all other installation procedures (git clone, linux brew, ...) have a look at https://github.com/junegunn/fzf
$(brew --prefix)/opt/fzf/install ─╯
Downloading bin/fzf ...
- Already exists
- Checking fzf executable ... 0.18.0
Do you want to enable fuzzy auto-completion? ([y]/n) y
Do you want to enable key bindings? ([y]/n) y
Generate /Users/hans/.fzf.bash ... OK
Generate /Users/hans/.fzf.zsh ... OK
Do you want to update your shell configuration files? ([y]/n) y
Update /Users/hans/.bashrc:
- [ -f ~/.fzf.bash ] && source ~/.fzf.bash
+ Added
Update /Users/hans/.zshrc:
- [ -f ~/.fzf.zsh ] && source ~/.fzf.zsh
+ Added
Finished. Restart your shell or reload config file.
source ~/.bashrc # bash
source ~/.zshrc # zsh
Use uninstall script to remove fzf.
Author by
Admin
Updated on September 18, 2022Comments
-
Admin over 1 year
Is it possible to trigger fzf history search automatically in zsh shell?
In this video, the user clicks "Ctrl+r" to start the history search and then starts typing. Is it possible to start the history search automatically when I start typing anything? Alternatively, is it possible to configure zsh so that a new prompt always starts in the "Ctrl+r" mode?
-
Marlon Richert over 2 yearsOP asked (emphasis mine) "Is it possible to start the history search automatically when I start typing anything?" Your answer does not do that.