-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathag
More file actions
32 lines (17 loc) · 711 Bytes
/
ag
File metadata and controls
32 lines (17 loc) · 711 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# 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 list the filenames:
ag -l {{foo}}
- Find files containing "FOO" case-insensitively, and print only 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}}