mirror of
https://github.com/ivuorinen/cheatsheet-tldr.git
synced 2026-03-08 10:57:32 +00:00
Update cheatsheets
This commit is contained in:
12
tldr/ag
12
tldr/ag
@@ -10,23 +10,23 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Find files containing "foo", and print the line matches in context:
|
||||
|
||||
`ag {{foo}}`
|
||||
`ag foo`
|
||||
|
||||
- Find files containing "foo" in a specific directory:
|
||||
|
||||
`ag {{foo}} {{path/to/directory}}`
|
||||
`ag foo {{path/to/directory}}`
|
||||
|
||||
- Find files containing "foo", but only list the filenames:
|
||||
|
||||
`ag {{[-l|--files-with-matches]}} {{foo}}`
|
||||
`ag {{[-l|--files-with-matches]}} foo`
|
||||
|
||||
- Find files containing "FOO" case-insensitively, and print only the match, rather than the whole line:
|
||||
|
||||
`ag {{[-i|--ignore-case]}} {{[-o|--only-matching]}} {{FOO}}`
|
||||
`ag {{[-i|--ignore-case]}} {{[-o|--only-matching]}} FOO`
|
||||
|
||||
- Find "foo" in files with a name matching "bar":
|
||||
|
||||
`ag {{foo}} {{[-G|--file-search-regex]}} {{bar}}`
|
||||
`ag foo {{[-G|--file-search-regex]}} bar`
|
||||
|
||||
- Find files whose contents match a regular expression:
|
||||
|
||||
@@ -34,4 +34,4 @@ source: https://github.com/tldr-pages/tldr.git
|
||||
|
||||
- Find files with a name matching "foo":
|
||||
|
||||
`ag {{[-g|--filename-pattern]}} {{foo}}`
|
||||
`ag {{[-g|--filename-pattern]}} foo`
|
||||
|
||||
Reference in New Issue
Block a user