Last active
January 11, 2018 05:01
-
-
Save siriusjack/fd4236370357ef7a583b2ce9499ed02c to your computer and use it in GitHub Desktop.
fzf-history integration for zsh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function history-fzf() { | |
BUFFER=$(history -n -r 1 | fzf --no-sort +m --query "$LBUFFER" --prompt="History > ") | |
CURSOR=$#BUFFER | |
zle reset-prompt | |
} | |
zle -N history-fzf | |
bindkey '^r' history-fzf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment