rg: Add example for searching filenames (#9856)
* rg: Add example for searching filenames * Reduce to 8 commands
This commit is contained in:
@@ -12,10 +12,6 @@
|
||||
|
||||
`rg --no-ignore --hidden {{regular_expression}}`
|
||||
|
||||
- Search for a regular expression only in a certain filetype (e.g. HTML, CSS, etc.):
|
||||
|
||||
`rg --type {{filetype}} {{regular_expression}}`
|
||||
|
||||
- Search for a regular expression only in a subset of directories:
|
||||
|
||||
`rg {{regular_expression}} {{set_of_subdirs}}`
|
||||
@@ -24,6 +20,10 @@
|
||||
|
||||
`rg {{regular_expression}} --glob {{glob}}`
|
||||
|
||||
- Search for filenames that match a regular expression:
|
||||
|
||||
`rg --files | rg {{regular_expression}}`
|
||||
|
||||
- Only list matched files (useful when piping to other commands):
|
||||
|
||||
`rg --files-with-matches {{regular_expression}}`
|
||||
|
Reference in New Issue
Block a user