Some new features
This commit is contained in:
parent
fd463e0d24
commit
42cffd35cc
9 changed files with 588 additions and 2 deletions
14
modules/percol/init
Executable file
14
modules/percol/init
Executable 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
|
Loading…
Add table
Add a link
Reference in a new issue