commit 76c63d36cc3f0b5906a6db9dbfce44788c3fbbd1 Author: Josh Skidmore Date: Wed Aug 19 06:08:56 2020 -0400 initial commit diff --git a/README.md b/README.md new file mode 100644 index 0000000..e3334c8 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +# zsh/fzf History Search \ No newline at end of file diff --git a/zsh-fzf-history-search.zsh b/zsh-fzf-history-search.zsh new file mode 100644 index 0000000..90bdaad --- /dev/null +++ b/zsh-fzf-history-search.zsh @@ -0,0 +1,8 @@ +fzf_history_seach() { + history -i 0 | fzf +s +m -x --tac -e | awk '{print substr($0, index($0, $4))}' | tr -d "\n" +} + +autoload fzf_history_seach +zle -N fzf_history_seach + +bindkey '^r' fzf_history_seach \ No newline at end of file