diff --git a/Examples.md b/Examples.md index 5f52307..cef4997 100644 --- a/Examples.md +++ b/Examples.md @@ -245,4 +245,21 @@ alias jj=zz # fsfzf - browse file system # https://github.com/D630/fzf-fs % . fsfzf.sh +``` + +### 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 ``` \ No newline at end of file