Skip to content

Commit

Permalink
Clarify the documentation of the --type-* flags.
Browse files Browse the repository at this point in the history
  • Loading branch information
amsharma91 committed Sep 20, 2016
1 parent a09907a commit 9c78110
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 6 deletions.
9 changes: 7 additions & 2 deletions doc/rg.1
Original file line number Diff line number Diff line change
Expand Up @@ -254,11 +254,16 @@ 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.
Example: \-\-type\-add html:\f[I]\&.html,\f[].htm
Note that this must be passed to every invocation of rg.
.RS
.RE
.PP
Example: \-\-type\-add html:\f[I]\&.html,\f[].htm
.TP
.B \-\-type\-clear \f[I]TYPE\f[] ...
Clear the file type globs for TYPE.
Clear the file type globs previously defined for TYPE.
This only clears the default type definitions that are found inside of
ripgrep.
Note that this must be passed to every invocation of rg.
.RS
.RE
8 changes: 6 additions & 2 deletions doc/rg.1.md
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,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.
: Add a new glob for a particular file type. Note that this must be
passed to every invocation of rg.

Example: --type-add html:*.html,*.htm

--type-clear *TYPE* ...
: Clear the file type globs for TYPE.
: Clear the file type globs previously defined for TYPE. This only clears
the default type definitions that are found inside of ripgrep. Note
that this must be passed to every invocation of rg.
8 changes: 6 additions & 2 deletions src/args.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,11 +163,15 @@ File type management options:
Show all supported file types and their associated globs.
--type-add ARG ...
Add a new glob for a particular file type.
Add a new glob for a particular file type. Note that this must be
passed to every invocation of rg.
Example: --type-add html:*.html,*.htm
--type-clear TYPE ...
Clear the file type globs for TYPE.
Clear the file type globs previously defined for TYPE. This only clears
the default type definitions that are found inside of ripgrep. Note
that this must be passed to every invocation of rg.
";

/// RawArgs are the args as they are parsed from Docopt. They aren't used
Expand Down

0 comments on commit 9c78110

Please sign in to comment.