How can I configure my ~/.ripgreprc
glob(s) to always search from the home directory regardless of where I run rg
from?
How can I configure ripgrep to always search from my home directory?
520 Views Asked by vadersfather At
1
How can I configure my ~/.ripgreprc
glob(s) to always search from the home directory regardless of where I run rg
from?
I'm pretty sure you can't configure ripgrep to do that, and it would be a bad idea to do that if you could, but you can make a shell function to do what you want.
Put this in your ~/.bashrc:
Then you just
rgh whatever
and it will expand torg whatever ~/
.(I chose
rgh
for "ripgrep home" but you can call it whatever you want.)