mirror of
https://github.com/BurntSushi/ripgrep.git
synced 2025-05-13 21:26:27 +02:00
parent
f0d3cae569
commit
ae863bc7aa
27
doc/rg.1
27
doc/rg.1
@ -64,20 +64,29 @@ Treat the pattern as a literal string instead of a regular expression.
|
|||||||
.TP
|
.TP
|
||||||
.B \-g, \-\-glob \f[I]GLOB\f[] ...
|
.B \-g, \-\-glob \f[I]GLOB\f[] ...
|
||||||
Include or exclude files for searching that match the given glob.
|
Include or exclude files for searching that match the given glob.
|
||||||
This always overrides any other ignore logic.
|
This always overrides any other ignore logic if there is a conflict, but
|
||||||
|
is otherwise applied in addition to ignore files (e.g., .gitignore or
|
||||||
|
\&.ignore).
|
||||||
Multiple glob flags may be used.
|
Multiple glob flags may be used.
|
||||||
Globbing rules match .gitignore globs.
|
Globbing rules match .gitignore globs.
|
||||||
Precede a glob with a \[aq]!\[aq] to exclude it.
|
Precede a glob with a \[aq]!\[aq] to exclude it.
|
||||||
.RS
|
.RS
|
||||||
.PP
|
|
||||||
Values given to \-g must be quoted or your shell will expand them and
|
|
||||||
result in unexpected behavior.
|
|
||||||
.PP
|
|
||||||
Combine with the \-\-files flag to return matched filenames (i.e., to
|
|
||||||
replicate ack/ag\[aq]s \-g flag).
|
|
||||||
.PP
|
|
||||||
For example: rg \-g \[aq]<glob>\[aq] \-\-files
|
|
||||||
.RE
|
.RE
|
||||||
|
.PP
|
||||||
|
The \-\-glob flag subsumes the functionality of both the \-\-include and
|
||||||
|
\-\-exclude flags commonly found in other tools.
|
||||||
|
.IP
|
||||||
|
.nf
|
||||||
|
\f[C]
|
||||||
|
Values\ given\ to\ \-g\ must\ be\ quoted\ or\ your\ shell\ will\ expand\ them\ and\ result
|
||||||
|
in\ unexpected\ behavior.
|
||||||
|
|
||||||
|
Combine\ with\ the\ \-\-files\ flag\ to\ return\ matched\ filenames
|
||||||
|
(i.e.,\ to\ replicate\ ack/ag\[aq]s\ \-g\ flag).
|
||||||
|
|
||||||
|
For\ example:\ rg\ \-g\ \[aq]\\<glob\\>\[aq]\ \-\-files
|
||||||
|
\f[]
|
||||||
|
.fi
|
||||||
.TP
|
.TP
|
||||||
.B \-h, \-\-help
|
.B \-h, \-\-help
|
||||||
Show this usage message.
|
Show this usage message.
|
||||||
|
@ -49,8 +49,13 @@ Project home page: https://github.com/BurntSushi/ripgrep
|
|||||||
|
|
||||||
-g, --glob *GLOB* ...
|
-g, --glob *GLOB* ...
|
||||||
: Include or exclude files for searching that match the given glob. This always
|
: Include or exclude files for searching that match the given glob. This always
|
||||||
overrides any other ignore logic. Multiple glob flags may be used. Globbing
|
overrides any other ignore logic if there is a conflict, but is otherwise
|
||||||
rules match .gitignore globs. Precede a glob with a '!' to exclude it.
|
applied in addition to ignore files (e.g., .gitignore or .ignore). Multiple
|
||||||
|
glob flags may be used. Globbing rules match .gitignore globs. Precede a
|
||||||
|
glob with a '!' to exclude it.
|
||||||
|
|
||||||
|
The --glob flag subsumes the functionality of both the --include and
|
||||||
|
--exclude flags commonly found in other tools.
|
||||||
|
|
||||||
Values given to -g must be quoted or your shell will expand them and result
|
Values given to -g must be quoted or your shell will expand them and result
|
||||||
in unexpected behavior.
|
in unexpected behavior.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user