ag: add Chinese translation

italian
Starccy 2019-02-25 17:45:31 +08:00 committed by Agniva De Sarker
parent 0ac71532fa
commit 729b5f1008
1 changed files with 31 additions and 0 deletions

31
pages.zh/common/ag.md Normal file
View File

@ -0,0 +1,31 @@
# ag
> The Silver Searcher. 类似ack,但是更快.
- 寻找内容包含"foo"的文件,并列出所在的行数:
`ag {{foo}}`
- 在指定目录中寻找内容包含"foo"的文件:
`ag {{foo}} {{path/to/directory}}`
- 寻找内容包含"foo"的文件,但只列出文件名:
`ag -l {{foo}}`
- 忽略大小写,寻找内容包含"FOO"的文件,并只输出匹配的内容,而非整行:
`ag -i -o {{FOO}}`
- 在文件名包含"bar"的文件中寻找"foo":
`ag {{foo}} -G {{bar}}`
- 使用正则表达式来匹配文件内容:
`ag '{{^ba(r|z)$}}'`
- 输出文件名包含"foo"的文件名:
`ag -g {{foo}}`