1
0
mirror of https://github.com/BurntSushi/ripgrep.git synced 2025-04-19 09:02:15 +02:00

Clarify documentation of --type-add.

This explains it a bit more based on end user feedback. We also fix
the example, which was wrong.

Fixes #82.
This commit is contained in:
Andrew Gallant 2016-09-25 14:36:53 -04:00
parent 82542df5cb
commit b2bbd46178
3 changed files with 15 additions and 7 deletions

View File

@ -272,11 +272,15 @@ Show all supported file types and their associated globs.
.TP .TP
.B \-\-type\-add \f[I]ARG\f[] ... .B \-\-type\-add \f[I]ARG\f[] ...
Add a new glob for a particular file type. Add a new glob for a particular file type.
Only one glob can be added at a time.
Multiple \-\-type\-add flags can be provided.
Unless \-\-type\-clear is used, globs are added to any existing globs
inside of ripgrep.
Note that this must be passed to every invocation of rg. Note that this must be passed to every invocation of rg.
.RS .RS
.RE .RE
.PP .PP
Example: \-\-type\-add html:\f[I]\&.html,\f[].htm Example: \f[C]\-\-type\-add\ html:*.html\f[]
.TP .TP
.B \-\-type\-clear \f[I]TYPE\f[] ... .B \-\-type\-clear \f[I]TYPE\f[] ...
Clear the file type globs previously defined for TYPE. Clear the file type globs previously defined for TYPE.

View File

@ -176,10 +176,12 @@ the raw speed of grep.
: Show all supported file types and their associated globs. : Show all supported file types and their associated globs.
--type-add *ARG* ... --type-add *ARG* ...
: Add a new glob for a particular file type. Note that this must be : Add a new glob for a particular file type. Only one glob can be added
passed to every invocation of rg. at a time. Multiple --type-add flags can be provided. Unless --type-clear
is used, globs are added to any existing globs inside of ripgrep. Note that
this must be passed to every invocation of rg.
Example: --type-add html:*.html,*.htm Example: `--type-add html:*.html`
--type-clear *TYPE* ... --type-clear *TYPE* ...
: Clear the file type globs previously defined for TYPE. This only clears : Clear the file type globs previously defined for TYPE. This only clears

View File

@ -175,10 +175,12 @@ File type management options:
Show all supported file types and their associated globs. Show all supported file types and their associated globs.
--type-add ARG ... --type-add ARG ...
Add a new glob for a particular file type. Note that this must be Add a new glob for a particular file type. Only one glob can be
passed to every invocation of rg. added at a time. Multiple --type-add flags can be provided. Unless
--type-clear is used, globs are added to any existing globs inside of
ripgrep. Note that this must be passed to every invocation of rg.
Example: --type-add html:*.html,*.htm Example: `--type-add html:*.html`
--type-clear TYPE ... --type-clear TYPE ...
Clear the file type globs previously defined for TYPE. This only clears Clear the file type globs previously defined for TYPE. This only clears