Skip to content

Instantly share code, notes, and snippets.

@dohq
Last active July 26, 2019 02:40
Show Gist options
  • Save dohq/9b97e07c865bb608108dd254b5e32fea to your computer and use it in GitHub Desktop.
Save dohq/9b97e07c865bb608108dd254b5e32fea to your computer and use it in GitHub Desktop.
fzf-history
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