Last active
July 26, 2019 02:40
-
-
Save dohq/9b97e07c865bb608108dd254b5e32fea to your computer and use it in GitHub Desktop.
fzf-history
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
setopt hist_ignore_all_dups | |
function fzf-history() { | |
BUFFER=$(history -n -r 1 | fzf --no-sort +m --query "$LBUFFER" --prompt="History > ") | |
CURSOR=$#BUFFER | |
zle clear-screen | |
} | |
zle -N fzf-history | |
bindkey '^r' fzf-history |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment