m/fzf
1
0
mirror of https://github.com/junegunn/fzf.git synced 2025-11-18 16:45:38 -05:00

Add Alt-i binding to paste item from locate / output (zsh only)

Yuri Bochkarev
2015-03-24 19:20:23 +03:00
parent c109b11966
commit c39757f165

@@ -245,4 +245,21 @@ alias jj=zz
# fsfzf - browse file system
# https://github.com/D630/fzf-fs
% . fsfzf.sh <ARG>
```
### Locate
`Alt-i` to paste item from `locate /` output (zsh only):
```sh
# ALT-I - Paste the selected entry from locate output into the command line
fzf-locate-widget() {
local selected
if selected=$(locate / | fzf +s -q "$LBUFFER"); then
LBUFFER=$selected
fi
zle redisplay
}
zle -N fzf-locate-widget
bindkey '\ei' fzf-locate-widget
```