3 ms·
> fzf (or another very similar tool that is designed for this purpose, broot) can be more efficient Well, fzf is only a selection tool, it's more about the too
by lloeki 4y ago
> fzf (or another very similar tool that is designed for this purpose, broot) can be more efficient
Well, fzf is only a selection tool, it's more about the tool that feeds fzf data ;) That's why I used a dumb ls in my example. Maybe a difference with yours is that it does perform cd on each loop, and there's no way to bail out and not cd.
> it might take a while for it to scan all subfolders.
Haha yeah, for recursive cases I was using ripgrep as fzf default command:
rg --files --no-ignore --hidden --follow --glob "!{.git,node_modules}/*" | fzf
And now I just discovered fd[0]:
fd --no-ignore --hidden --follow --strip-cwd-prefix | fzf
(...at least essentially, my setup is a bit more tunable and complex, I have a few of these with varying flags depending on the situation and goal)
[0]: https://github.com/sharkdp/fd#using-fd-with-fzf https://github.com/sharkdp/fd#using-fd-with-fzf