Some new features

This commit is contained in:
Alexander Gehrke 2014-06-27 07:45:18 +02:00
parent fd463e0d24
commit 42cffd35cc
9 changed files with 588 additions and 2 deletions

14
modules/percol/init Executable file
View file

@ -0,0 +1,14 @@
#!/bin/zsh
if exists percol; then
function percol_select_history() {
local tac
exists gtac && tac="gtac" || { exists tac && tac="tac" || { tac="tail -r" } }
BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER")
CURSOR=$#BUFFER # move cursor
zle -R -c # refresh
}
zle -N percol_select_history
bindkey '^R' percol_select_history
fi