CommandCross-platform
Tome of History
Search Shell Command History with Fuzzy Finder
Interactively search through shell history using fuzzy matching, then execute or edit the selected command. Dramatically speeds up recalling complex commands.
history | fzf --tac --no-sort | sed 's/^[ ]*[0-9]*[ ]*//' | xargs -I {} bash -c '{}'Usage Notes
- •
--tacreverses order so recent commands appear first - •
--no-sortpreserves chronological order during search - •Press Enter to execute, Ctrl+C to cancel
- •For zsh, use
fc -l 1instead ofhistory - •Install fzf:
brew install fzforapt install fzf - •Consider adding as shell alias for quick access
Warnings
Executes the selected command immediately. Review the command before pressing Enter.
Related Scroll Ideas
- • Fuzzy find and cd into directory
- • Search and open file in editor
- • Interactive git branch switcher