diff --git a/GUIDE.md b/GUIDE.md index 264d55a0..313c89ad 100644 --- a/GUIDE.md +++ b/GUIDE.md @@ -539,6 +539,13 @@ $ cat $HOME/.ripgreprc --type-add web:*.{html,css,js}* +# Using glob patterns to include/exclude files or folders +--glob=!git/* + +# or +--glob +!git/* + # Set the colors. --colors=line:none --colors=line:style:bold diff --git a/doc/rg.1.txt.tpl b/doc/rg.1.txt.tpl index 5af3eb29..fc268f8b 100644 --- a/doc/rg.1.txt.tpl +++ b/doc/rg.1.txt.tpl @@ -98,6 +98,28 @@ would behave identically to the following command rg --smart-case foo +another example is adding types + + --type-add + web:*.{html,css,js}* + +would behave identically to the following command + + rg --type-add 'web:*.{html,css,js}*' foo + +same with using globs + + --glob=!git/* + +or + + --glob + !git/* + +would behave identically to the following command + + rg --glob '!git/*' foo + ripgrep also provides a flag, *--no-config*, that when present will suppress any and all support for configuration. This includes any future support for auto-loading configuration files from pre-determined paths.