mirror of https://github.com/CrimsonTome/tldr.git
rg: Add example for searching filenames (#9856)
* rg: Add example for searching filenames * Reduce to 8 commandspull/6/head
parent
cf0e914f0c
commit
3d77e1a35c
|
@ -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…
Reference in New Issue