mirror of
https://gitlab.com/linuxstuff/dotfiles.git
synced 2026-11-16 15:55:11 +01:00
Added class and os alternates
This commit is contained in:
1 parent
5a5286b38c
commit
80a58d4669
793 files changed
+63028
-295
No files matched your search
Executable
+22
@@ -0,0 +1,22 @@
|
||||
if which percol &> /dev/null; then
|
||||
function percol_select_history() {
|
||||
local tac
|
||||
which gtac &> /dev/null && tac="gtac" || { which tac &> /dev/null && tac="tac" || { tac="tail -r" } }
|
||||
BUFFER=$(fc -l -n 1 | eval $tac | percol --query "$LBUFFER")
|
||||
CURSOR=$#BUFFER
|
||||
zle -R -c
|
||||
}
|
||||
|
||||
zle -N percol_select_history
|
||||
bindkey '^R' percol_select_history
|
||||
|
||||
if which marks &> /dev/null; then
|
||||
function percol_select_marks() {
|
||||
BUFFER=$(marks | percol --query "$LBUFFER" | awk '{print $3}')
|
||||
CURSOR=$#BUFFER # move cursor
|
||||
zle -R -c # refresh
|
||||
}
|
||||
zle -N percol_select_marks
|
||||
bindkey '^B' percol_select_marks
|
||||
fi
|
||||
fi
|
||||
Reference in new issue
Block a user