From 4517f2e411c49af3457f1556ca0935d96f46704f Mon Sep 17 00:00:00 2001 From: Waldir Pimenta Date: Mon, 2 May 2016 14:33:59 +0100 Subject: [PATCH] ag: add -l and -o options --- pages/common/ag.md | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pages/common/ag.md b/pages/common/ag.md index e024a5fde8..820d8e5641 100644 --- a/pages/common/ag.md +++ b/pages/common/ag.md @@ -2,13 +2,17 @@ > The Silver Searcher. Like ack, but faster. -- Find files containing "foo": +- Find files containing "foo", and print the line matches in context: `ag foo` -- Find files containing "FOO" case-insensitively: +- Find files containing "foo", but only list the filenames: -`ag -i FOO` +`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":