Update cheatsheets

This commit is contained in:
ivuorinen
2024-02-21 11:19:49 +00:00
parent 4e88a1b42f
commit 3d653cc7e6
4803 changed files with 127002 additions and 0 deletions

37
ag Normal file
View File

@@ -0,0 +1,37 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# ag
> The Silver Searcher. Like `ack`, but aims to be faster.
> More information: <https://github.com/ggreer/the_silver_searcher>.
- Find files containing "foo", and print the line matches in context:
`ag {{foo}}`
- Find files containing "foo" in a specific directory:
`ag {{foo}} {{path/to/directory}}`
- Find files containing "foo", but only [l]ist the filenames:
`ag -l {{foo}}`
- Find files containing "FOO" case-[i]nsensitively, and print [o]nly the match, rather than the whole line:
`ag -i -o {{FOO}}`
- Find "foo" in files with a name matching "bar":
`ag {{foo}} -G {{bar}}`
- Find files whose contents match a regular expression:
`ag '{{^ba(r|z)$}}'`
- Find files with a name matching "foo":
`ag -g {{foo}}`