Andrew's Digital Garden

Exclude folders (or files) in ripgrep

rg foo -g '!bar/'

Without the /, a file named bar will also be excluded.

To ignore multiple files/folders, use {}

rg foo -g '!{.git,.svn,.hg}'

[[shell]]

Exclude folders (or files) in ripgrep