Two useful `rg` and `fd` aliases
Two useful `rg` and `fd` aliases
Tuesday, October 1, 2024
Often when searching you want to exclude certain directories. If you are using ripgrep and fd (tools written in Rust), you can exclude directories by doing something like this:
alias rg='rg --no-follow --glob "!{/proc,/sys,$(go env GOPATH),**/.git/*}"'
alias fd='fd --exclude /proc --exclude /sys --exclude $(go env GOPATH)'Remember to add --hidden to both aliases if you want to search for hidden files.
Last updated on • Mohamed Bana