Options (5)
-l, --files-with-matchesbooleanFind files containing `string`, but only list the filenames
ag {{[-l|--files-with-matches]}} string-i, --ignore-casebooleanFind files containing `STRING` case-insensitively, and print only the match, rather than the whole line
ag {{[-i|--ignore-case]}} {{[-o|--only-matching]}} STRING-o, --only-matchingbooleanFind files containing `STRING` case-insensitively, and print only the match, rather than the whole line
ag {{[-i|--ignore-case]}} {{[-o|--only-matching]}} STRING-G, --file-search-regexbooleanFind `string` in files with a name matching `file_name`
ag string {{[-G|--file-search-regex]}} file_name-g, --filename-patternbooleanFind files with a name matching `string`
ag {{[-g|--filename-pattern]}} stringExamples (7)
Find files containing `string`, and print the line matches in context
ag stringFind files containing `string` in a specific directory
ag string path/to/directoryFind files containing `string`, but only list the filenames
ag [-l|--files-with-matches] stringFind files containing `STRING` case-insensitively, and print only the match, rather than the whole line
ag [-i|--ignore-case] [-o|--only-matching] STRINGFind `string` in files with a name matching `file_name`
ag string [-G|--file-search-regex] file_nameFind files whose contents match a `regex`
ag '^ca(t|r)$'Find files with a name matching `string`
ag [-g|--filename-pattern] string