]> arthur.barton.de Git - ax-zsh.git/blob - plugins/fzy/fzy.zshrc
New "fzy" plugin
[ax-zsh.git] / plugins / fzy / fzy.zshrc
1 # AX-ZSH: Alex' Modular ZSH Configuration
2 # fzy.zshrc: Setup Git
3
4 axzsh_is_modern_terminal || return 91
5
6 # Make sure that "fzy(1)" is installed
7 (( $+commands[fzy] )) || return 1
8
9 function history-fzy() {
10         BUFFER=$(fc -lnr 0 | fzy -l $((LINES/2)) -q "$LBUFFER")
11         CURSOR=$#BUFFER
12         zle reset-prompt
13 }
14
15 zle -N history-fzy
16 bindkey '^r' history-fzy
17
18 return 0