Skip to content

Instantly share code, notes, and snippets.

@jhbabon
Created June 3, 2020 08:53
Show Gist options
  • Save jhbabon/37120eca305dee704d0c2eea1a12f8f2 to your computer and use it in GitHub Desktop.
Save jhbabon/37120eca305dee704d0c2eea1a12f8f2 to your computer and use it in GitHub Desktop.
Filter ZSH history with scout
setopt hist_ignore_all_dups
# based on: https://gist.github.com/dohq/9b97e07c865bb608108dd254b5e32fea
function scout-history() {
BUFFER=$(history -n -r 1 | scout --inline --lines=10 --search="$LBUFFER")
CURSOR=$#BUFFER
zle clear-screen
}
zle -N scout-history
bindkey '^r' scout-history
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment