mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-04-29 23:24:55 +02:00
Merge e6368a1637
into ae71920c10
This commit is contained in:
commit
9f68ada1aa
1 changed files with 15 additions and 15 deletions
|
@ -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}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue