I would be really awesome to have a feature to search text inside files.
You may need ripgrep. E.g. rg ---files-with-matches -0 PATTERN [path]...
Yes, there are other tools that are designed for this purpose (like ripgrep, grep, ag, etc.).
If you have already built a search query in fd, you can still use xargs to search exactly these files:
> fd -e rs '^[am]'
src/app.rs
src/fshelper/mod.rs
src/lscolors/mod.rs
src/main.rs
tests/testenv/mod.rs
> fd -e rs '^[am]' | xargs grep 'fn main'
src/main.rs:fn main() {
Most helpful comment
You may need ripgrep. E.g.
rg ---files-with-matches -0 PATTERN [path]...