#3522·ripgrep

Feature: add `-G` to exclude files by glob pattern

Author: ttencateCreated Sep 1, 2026Updated Sep 8, 2026

A very common use case for me is to exclude some file or directory from a search: documentation, translations, etc.. Notice that these are under version control, so .gitignore doesn't help me.

I can of course use -g '!docs' for that, but because ! has special meaning in bash, it needs extra quotes.

A simpler way, and analogous to -t vs. -T, would be to add -G pattern as an alias for -g '!pattern'.

Happy to try my hand at a PR if you think this is a good idea.