Created
June 3, 2020 08:53
-
-
Save jhbabon/37120eca305dee704d0c2eea1a12f8f2 to your computer and use it in GitHub Desktop.
Filter ZSH history with scout
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 | |
# 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