A Zsh function to fuzzy-search command history with fzf. It removes the history line numbers (e.g. 37 reload
) so only the command (reload
) is inserted.
- Install fzf (via
brew
,apt
, etc.). - Copy this script into
~/.zshrc
(or source it from there). - Restart your shell or run
source ~/.zshrc
.
- Press Ctrl+G to open the history search.
- Select a command; line numbers are stripped automatically.