1
0
Fork 0
mirror of https://github.com/tldr-pages/tldr.git synced 2025-07-25 08:35:24 +02:00

ag: tokenize values

This commit is contained in:
AnimiVulpis 2017-10-30 23:48:56 +01:00
parent aa405d2f20
commit 2d3be20046

View file

@ -4,24 +4,24 @@
- Find files containing "foo", and print the line matches in context:
`ag foo`
`ag {{foo}}`
- Find files containing "foo", but only list the filenames:
`ag -l foo`
`ag -l {{foo}}`
- Find files containing "FOO" case-insensitively, and print only the match, rather than the whole line:
`ag -i -o FOO`
`ag -i -o {{FOO}}`
- Find "foo" in files with a name matching "bar":
`ag foo -G bar`
`ag {{foo}} -G {{bar}}`
- Find files whose contents match a regular expression:
`ag '^ba(r|z)$'`
`ag '^{{ba}}({{r}}|{{z}})$'`
- Find files with a name matching "foo":
`ag -g foo`
`ag -g {{foo}}`