Zet - How do you get ripgrep to ignore a folder

How do you get ripgrep to ignore a folder

Thus, if you want to search for foo occurrences, but are not interested in anything in the bar folder, you can use

rg foo -g '!bar/'

Note that without the /, a file called bar will also be ignored.

#rg #ripgrep