tldr/pages/common/ag.md

20 lines
291 B
Markdown
Raw Normal View History

2014-05-02 02:23:01 +01:00
# ag
> The Silver Searcher. Like ack, but faster.
- Find files containing "foo":
2014-05-02 02:23:01 +01:00
`ag foo`
- Find "foo" in files with a name matching "bar":
2014-05-02 02:23:01 +01:00
`ag foo -G bar`
- Find files whose contents match a regular expression:
`ag '^ba(r|z)$'`
- Find files with a name matching "foo":
2014-05-02 02:23:01 +01:00
`ag -g foo`