Closed backpropper closed 3 months ago
I assume you're relying on fd
to list entries in fzf
. Did you experiment with the --search-path
flag in fd
?
print -D $PWD
# ~/Developer/fzf/bin
fd --search-path ../doc --search-path .
./fzf-preview.sh
./fzf-tmux
../doc/fzf.txt
Combined with the reload
action, you should be able to accomplish your goal.
fzf --bind 'ctrl-b:reload:fd --search-path ../doc --search-path .'
I suggest that you use fuzzy completion instead for that purpose.
vim /dirA/**<TAB>
See https://github.com/junegunn/fzf?tab=readme-ov-file#fuzzy-completion-for-bash-and-zsh
Since you're using zsh, also see https://github.com/junegunn/fzf/wiki/Configuring-fuzzy-completion#dedicated-completion-key
Yes, I've tried the above setting. Your suggestion requires one to exit fzf -> then reopen it with dirA which is my current workflow anyway. I was wondering if it is possible to achieve this without leaving fzf in the first place.
Checklist
man fzf
)Output of
fzf --version
0.52.1
OS
Shell
Problem / Steps to reproduce
Let's assume I am in directory /dirA. There is also a /dirB.
Very often there are case where I want to use FZF's CTRL-T to search relative to dirB although I am currently inside dirA.
For example,
cd /dirA ... cd /dirB