Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ライフチェンジングなpercolとautojumpの紹介 - 404 Engineer Logs http://blog.zoncoen.net/blog/2014/01/14/percol-autojump-with-zsh/ のUbuntu 14.04対応版
function exists { which $1 &> /dev/null }
if exists percol; then
function percol_select_history() {
local tac
BUFFER=$(history | sed -e "s/^\\s*[0-9]*\\s*\\*\?\\s*//g" | tac | percol --query "$LBUFFER")
CURSOR=$#BUFFER # move cursor
zle -R -c # refresh
}
zle -N percol_select_history
bindkey '^R' percol_select_history
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.