summaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authorAndrew Gallant <jamslam@gmail.com>2016-09-25 14:36:53 -0400
committerAndrew Gallant <jamslam@gmail.com>2016-09-25 14:37:01 -0400
commitb2bbd46178b34f45a5c97c8b25b54a33b544b3da (patch)
treedc643384a4a7537a35da8e45a7ef7cc983ca4c32 /doc
parent82542df5cb6bb34d00db27093c289c3a2c3c22a9 (diff)
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.
Diffstat (limited to 'doc')
-rw-r--r--doc/rg.16
-rw-r--r--doc/rg.1.md8
2 files changed, 10 insertions, 4 deletions
diff --git a/doc/rg.1 b/doc/rg.1
index 06325661..0df63968 100644
--- a/doc/rg.1
+++ b/doc/rg.1
@@ -272,11 +272,15 @@ Show all supported file types and their associated globs.
.TP
.B \-\-type\-add \f[I]ARG\f[] ...
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.
.RS
.RE
.PP
-Example: \-\-type\-add html:\f[I]\&.html,\f[].htm
+Example: \f[C]\-\-type\-add\ html:*.html\f[]
.TP
.B \-\-type\-clear \f[I]TYPE\f[] ...
Clear the file type globs previously defined for TYPE.
diff --git a/doc/rg.1.md b/doc/rg.1.md
index b9f68968..139582c3 100644
--- a/doc/rg.1.md
+++ b/doc/rg.1.md
@@ -176,10 +176,12 @@ the raw speed of grep.
: Show all supported file types and their associated globs.
--type-add *ARG* ...
-: Add a new glob for a particular file type. Note that this must be
- passed to every invocation of rg.
+: 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.
- Example: --type-add html:*.html,*.htm
+ Example: `--type-add html:*.html`
--type-clear *TYPE* ...
: Clear the file type globs previously defined for TYPE. This only clears