Skip to content

Commit

Permalink
peco
Browse files Browse the repository at this point in the history
  • Loading branch information
hitode909 committed Sep 12, 2015
1 parent d9c6814 commit 3b9bdcd
Showing 1 changed file with 17 additions and 12 deletions.
29 changes: 17 additions & 12 deletions zshrc
Expand Up @@ -489,17 +489,6 @@ alias keyon='sudo kextload /System/Library/Extensions/AppleUSBTopCase.kext/Conte

eval "$(plenv init -)"



for f (~/co/dotfiles/percol-sources/*) source "${f}"
bindkey '^r' percol-select-history

bindkey '^x^b' percol-git-recent-branches
bindkey '^xb' percol-git-recent-all-branches

bindkey '^xp' percol-perl-prove
bindkey '^x^p' percol-perl-prove-test-class

export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

Expand All @@ -519,4 +508,20 @@ function cliime() {
export PATH="$HOME/.ndenv/bin:$PATH"
eval "$(ndenv init -)"

export ANE=""
export ANE=""

function peco-select-history() {
local tac
if which tac > /dev/null; then
tac="tac"
else
tac="tail -r"
fi
BUFFER=$(history -n 1 | \
eval $tac | \
peco --query "$LBUFFER")
CURSOR=$#BUFFER
zle clear-screen
}
zle -N peco-select-history
bindkey '^r' peco-select-history

0 comments on commit 3b9bdcd

Please sign in to comment.