mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-08-04 14:15:44 +02:00
rg: Add example for searching filenames (#9856)
* rg: Add example for searching filenames * Reduce to 8 commands
This commit is contained in:
parent
cf0e914f0c
commit
3d77e1a35c
1 changed files with 4 additions and 4 deletions
|
@ -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}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue