A zsh plugin that provides fuzzy search for zsh history, inspired by zsh-fzf-history-search. Differences from zsh-fzf-history-search, history is loaded into the buffer untouched, eliminating parsing issues. Preview window is also supported for better multi-line command preview.
Either fzf or skim is required.
git clone https://github.com/MamoruDS/dotfiles.git ~/somewhereThen add the following line to your .zshrc:
source ~/somewhere/zsh-history-fuzzy-search.zshzinit light MamoruDS/zsh-history-fuzzy-search-
ZSH_HISTORY_FUZZY_SEARCH_BINDDefault:
^rKeybinding to start plugin.
-
ZSH_HISTORY_FUZZY_SEARCH_NO_BINDDefault:
0Disable any keybinding for starting the plugin. This overrides the
ZSH_HISTORY_FUZZY_SEARCH_BINDsetting. -
ZSH_HISTORY_FUZZY_SEARCH_SHOW_DATESDefault:
0Show time-date stamps in ISO 8601 format in the searching list.
-
ZSH_HISTORY_FUZZY_SEARCH_SHOW_EVENT_NUMBERSDefault:
0Show event numbers in the searching list.
-
ZSH_HISTORY_FUZZY_SEARCH_FUZZERDefault:
fzfValid fuzzy finders arefzfandsk. -
ZSH_HISTORY_FUZZY_SEARCH_FUZZER_ARGSDefault (for fzf):
+s +m -eDefault (for skim):--no-sort --no-multi --ansi -e -
ZSH_HISTORY_FUZZY_SEARCH_REMOVE_DUPLICATESDefault:
0Remove duplicate commands from the searching list.
-
ZSH_HISTORY_FUZZY_SEARCH_PREVIEW_PIPE_CMDDefault:
cat -
ZSH_HISTORY_FUZZY_SEARCH_PREVIEW_WINDOW_ARGSDefault:
down:30%