junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
65.28k stars 2.4k forks source link

bind reload with zoxide to change working directory #2834

Open y1rn opened 2 years ago

y1rn commented 2 years ago

Info

Problem / Steps to reproduce

change working directory is helpful for CTRL_T and (neo)vim reload not work with fzf pop up(execute works well) such as: fzf --bind 'ctrl-w:reload(zoxide query --list| fzf | xargs rg --files)'

pyglot commented 2 years ago

I'm a novice user but I expect reload sets up a new input stream/pipe to fzf with the same options it was launched with. Reload will also not affect where the output is piped. Perhaps this is closer to what you are trying to achieve:

zoxide query --list | fzf --bind 'ctrl-w:reload(zoxide query --list))' | xargs rg --files
zhuzhzh commented 1 year ago

I have the same requirement.

by default, fzf will list the file in current directory. Then I want to change the directory (got from zoxide query -i) and run fzf in that directory.