Update cheatsheets

This commit is contained in:
ivuorinen
2025-04-26 00:18:47 +00:00
parent 9b06c2023f
commit 47db9e503e
127 changed files with 302 additions and 302 deletions

12
tldr/ag
View File

@@ -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`