4 ms·
You may want to use file globbing instead. This is one I just used yesterday afternoon. I needed to search for a string in every .js or .jsx file in my project,
by revscat 5y ago
You may want to use file globbing instead. This is one I just used yesterday afternoon. I needed to search for a string in every .js or .jsx file in my project, but didn't want to include specs in the search.
rg 'MySearchString' **/*.js[x]#~*spec*
Voila. Note that this is for zsh, and you need to set the EXTENDED_GLOB option. But once you do you'll find yourself rarely needing to reach for `find`.
- nicce 5y agoIs it really better option? You can find "find" from every Linux system. For this sample, you would need to install zsh and enable globbing manually as well. It works only on your machine, but on the other hand there is chance learn something which applies everywhere.