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)
17
Examples.md
17
Examples.md
@@ -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
|
||||
```
|
||||
Reference in New Issue
Block a user