1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-04-29 23:24:55 +02:00
This commit is contained in:
gsspdev 2025-04-29 21:27:58 +03:00 committed by GitHub
commit 9f68ada1aa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -2,36 +2,36 @@
> Ripgrep, a recursive line-oriented search tool.
> Aims to be a faster alternative to `grep`.
> More information: <https://github.com/BurntSushi/ripgrep>.
> More information: <https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md>.
- Recursively search the current directory for a regular expression:
- Recursively search current directory for a pattern (regular expression):
`rg {{regular_expression}}`
`rg {{pattern}}`
- Search for regular expressions recursively in the current directory, including hidden files and files listed in `.gitignore`:
- Include hidden files and entries listed in `.gitignore`:
`rg --no-ignore --hidden {{regular_expression}}`
`rg {{[-.|--hidden --no-ignore]}} {{pattern}}`
- Search for a regular expression only in a subset of directories:
- Only search a subset of directories:
`rg {{regular_expression}} {{set_of_subdirs}}`
`rg {{pattern}} {{set_of_subdirs}}`
- Search for a regular expression in files matching a glob (e.g. `README.*`):
- Only search the files who's names match the glob pattern(s) (e.g. `README.*`):
`rg {{regular_expression}} --glob {{glob}}`
`rg {{pattern}} {{[-g|--glob]}} {{filename_glob_pattern}}`
- Search for filenames that match a regular expression:
- Recursively list filenames in the current directory that match pattern:
`rg --files | rg {{regular_expression}}`
`rg --files | rg {{pattern}}`
- Only list matched files (useful when piping to other commands):
`rg --files-with-matches {{regular_expression}}`
`rg {{[-l|--files-with-matches]}} {{pattern}}`
- Show lines that do not match the given regular expression:
- Show lines that do not match the pattern:
`rg --invert-match {{regular_expression}}`
`rg {{[-v|--invert-match]}} {{pattern}}`
- Search a literal string pattern:
`rg --fixed-strings -- {{string}}`
`rg {{[-F|--fixed-strings]}} -- {{string}}`