diff options
author | Marvin Borner | 2020-03-16 23:33:42 +0100 |
---|---|---|
committer | Marvin Borner | 2020-03-16 23:33:42 +0100 |
commit | 0e9ddbb0bf0cd34500155ea4b03de2e2a38d8ab2 (patch) | |
tree | 719da1c7fe5dabb872fe9ff1582c39b55ccd488e /.oh-my-zsh/plugins/percol | |
parent | e5d38956336ab1be954bdbd12808c5f98f8bd925 (diff) |
Well I'm using Arch again
Diffstat (limited to '.oh-my-zsh/plugins/percol')
-rw-r--r-- | .oh-my-zsh/plugins/percol/README.md | 20 | ||||
-rw-r--r-- | .oh-my-zsh/plugins/percol/percol.plugin.zsh | 22 |
2 files changed, 0 insertions, 42 deletions
diff --git a/.oh-my-zsh/plugins/percol/README.md b/.oh-my-zsh/plugins/percol/README.md deleted file mode 100644 index b262e41..0000000 --- a/.oh-my-zsh/plugins/percol/README.md +++ /dev/null @@ -1,20 +0,0 @@ -## percol - -Provides some useful function to make [percol](https://github.com/mooz/percol) work with zsh history and [jump plugin](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/jump/jump.plugin.zsh) - -### Requirements - -```shell -pip install percol -``` - -And [jump](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/jump/jump.plugin.zsh) for `oh-my-zsh` is a optional requirement. - -### Usage - -For default - -- `^-r` bind to `percol_select_history`.You can use it to grep your history with percol. - -- `^-b` bind to `percol_select_marks`.You can use it to grep your bookmarks with percol. - diff --git a/.oh-my-zsh/plugins/percol/percol.plugin.zsh b/.oh-my-zsh/plugins/percol/percol.plugin.zsh deleted file mode 100644 index c6adf4e..0000000 --- a/.oh-my-zsh/plugins/percol/percol.plugin.zsh +++ /dev/null @@ -1,22 +0,0 @@ -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 |