rg 'YOUR_SERCH_TERMS' <location> -l | xargs sed \
-i '' 's,YOUR_SEARCH_TERMS,REPLACE_VALUE,g'
-l
list all the affected files- NOTE:
sed
does not have full regex support, at least for what I tried, so you cannot use the same pattern as forrg
Examples
rg "import (\w+) from '@components/untitled-icons/(.*)'" \
src/**/* -l | xargs \
sed -i '' "s,import \(.*\) from '@components/untitled-icons/\(.*\)',import { \1 } from '@smartfish/icons',g"