Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
ライフチェンジングなpercolとautojumpの紹介 - 404 Engineer Logs の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
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.