fzf
標準出力に対してフィルタをかけれるツール
It's an interactive Unix filter for command-line that can be used with any list; files, command history, processes, hostnames, bookmarks, git commits, etc.
https://gyazo.com/0ff6dd6f56ef3912488d832a344f4357
~/.zshrcに次を追加する
code:.zshrc
function select-history() {
BUFFER=$(history -n -r 1 | fzf --no-sort +m --query "$LBUFFER" --prompt="History > ")
CURSOR=$#BUFFER
}
zle -N select-history
bindkey '^r' select-history
歴史