4 ms·
alias fd="rg --files | rg"
by tucnak 2y ago
alias fd="rg --files | rg"
- GCUMstlyHarmls 2y agoThis isn't directly comparable, `fd` will find files with `X` in the name, but the `rg` alias will find all paths with `X` in it. Eg, λ mkdir wing && touch wing/xwing.exe wing/tie.exe λ fd wing wing/ wing/xwing.exe λ rg --files | rg wing wing/tie.exe wing/xwing.exe
- tucnak 2y agoI guess you're right. Isn't the former more useful in general? I find myself reaching for `:Rg` in Vim much more often than `:Files` or `:GFiles` courtesy of fzf.
- DaSHacka 2y agoThey're just completely different tools. The other day I was searching for a PDF I downloaded three years ago from a certain company. Simply ran `find ~/Downloads -iname '<company-name>'` and it immediately popped up. rg would not have helped me there. Even if I used something like rga, it would have taken significantly longer to parse the contents of every file in my home directory.
- deleted 2y ago[deleted]