{
"name": "ag",
"description": "Recursively search for PATTERN in PATH. Like grep or ack, but faster",
"options": [
{
"names": [
"--ackmate"
],
"description": "Output results in a format parseable by AckMate https://github.com/protocool/AckMate"
},
{
"names": [
"--affinity"
],
"description": "Set thread affinity (if platform supports it)"
},
{
"names": [
"--noaffinity"
],
"description": "Don't set thread affinity (if platform supports it)"
},
{
"names": [
"-a",
"--all-types"
],
"description": "Search all files. This doesn't include hidden files, and doesn't respect any ignore files"
},
{
"names": [
"-A",
"--after"
],
"description": "Print lines after match",
"takes_arg": true,
"arg": {
"name": "LINES",
"description": "The amount of lines"
}
},
{
"names": [
"-B",
"--before"
],
"description": "Print lines before match",
"takes_arg": true,
"arg": {
"name": "LINES",
"description": "The amount of lines"
}
},
{
"names": [
"--nobreak"
],
"description": "Print a newline between matches in different files. Enabled by default"
},
{
"names": [
"-c",
"--count"
],
"description": "Only print the number of matches in each file. Note: This is the number of matches, not the number of matching lines. Pipe output to wc -l if you want the number of matching lines"
},
{
"names": [
"--color"
],
"description": "Print color codes in results"
},
{
"names": [
"--nocolor"
],
"description": "Don't print color codes in results"
},
{
"names": [
"--color-line-number"
],
"description": "Color codes for line numbers. Default is 1;33"
},
{
"names": [
"--color-match"
],
"description": "Color codes for result match numbers. Default is 30;43"
},
{
"names": [
"--color-path"
],
"description": "Color codes for path names. Default is 1;32"
},
{
"names": [
"--column"
],
"description": "Print column numbers in results"
},
{
"names": [
"-C",
"--context"
],
"description": "Print lines before and after matches",
"takes_arg": true,
"arg": {
"name": "LINES",
"description": "The amount of lines"
}
},
{
"names": [
"-D",
"--debug"
],
"description": "Output ridiculous amounts of debugging info. Not useful unless you're actually debugging"
},
{
"names": [
"--depth"
],
"description": "Search up to NUM directories deep, -1 for unlimited",
"takes_arg": true,
"arg": {
"name": "NUM",
"description": "The depth in directories to search"
}
},
{
"names": [
"--filename"
],
"description": "Print file names"
},
{
"names": [
"--nofilename"
],
"description": "Don't print file names"
},
{
"names": [
"-f",
"--follow"
],
"description": "Follow symlinks"
},
{
"names": [
"--nofollow"
],
"description": "Don't follow symlinks"
},
{
"names": [
"-F",
"--fixed-strings"
],
"description": "Alias for --literal for compatibility with grep"
},
{
"names": [
"--group"
],
"description": "Lumps multiple matches in the same file together, and presents them under a single occurrence of the filename"
},
{
"names": [
"--nogroup"
],
"description": "Refrains from lumping matches in the same file together, and instead places the filename at the start of each match line"
},
{
"names": [
"-g"
],
"description": "Print filenames matching PATTERN",
"takes_arg": true,
"arg": {
"name": "PATTERN",
"description": "The pattern to look for"
}
},
{
"names": [
"-G",
"--file-search-regex"
],
"description": "Only search files whose names match PATTERN",
"takes_arg": true,
"arg": {
"name": "PATTERN",
"description": "The pattern to look for"
}
},
{
"names": [
"-H",
"--heading"
],
"description": "Print filenames above matching contents"
},
{
"names": [
"--noheading"
],
"description": "Don't print filenames above matching contents"
},
{
"names": [
"--hidden"
],
"description": "Search hidden files. This option obeys ignored files"
},
{
"names": [
"--ignore"
],
"description": "Ignore files/directories whose names match this pattern. Literal file and directory names are also allowed",
"takes_arg": true,
"arg": {
"name": "PATTERN",
"description": "The pattern to look for",
"template": "filepaths"
}
},
{
"names": [
"--ignore-dir"
],
"description": "Alias for --ignore for compatibility with ack",
"takes_arg": true,
"arg": {
"name": "NAME",
"description": "The directory to ignore",
"template": "filepaths"
}
},
{
"names": [
"-i",
"--ignore-case"
],
"description": "Match case-insensitively"
},
{
"names": [
"-l",
"--files-with-matches"
],
"description": "Only print the names of files containing matches, not the matching lines. An empty query will print all files that would be searched"
},
{
"names": [
"-L",
"--files-without-matches"
],
"description": "Only print the names of files that don't contain matches"
},
{
"names": [
"--list-file-types"
],
"description": "See FILE TYPES below"
},
{
"names": [
"-m",
"--max-count"
],
"description": "Skip the rest of a file after NUM matches. Default is 0, which never skips",
"takes_arg": true,
"arg": {
"name": "NUM",
"description": "The number of matches to skip after"
}
},
{
"names": [
"--mmap"
],
"description": "Use of memory-mapped I/O. Defaults to true on platforms where mmap() is faster than read(). (All but macOS.)"
},
{
"names": [
"--nommap"
],
"description": "Don't use of memory-mapped I/O. Defaults to true on platforms where mmap() is faster than read(). (All but macOS.)"
},
{
"names": [
"--multiline"
],
"description": "Match regexes across newlines"
},
{
"names": [
"--nomultiline"
],
"description": "Don't match regexes across newlines"
},
{
"names": [
"-n",
"--norecurse"
],
"description": "Don't recurse into directories"
},
{
"names": [
"--numbers"
],
"description": "Print line numbers"
},
{
"names": [
"--nonumbers"
],
"description": "Don't print line numbers"
},
{
"names": [
"-o",
"--only-matching"
],
"description": "Print only the matching part of the lines"
},
{
"names": [
"--one-device"
],
"description": "When recursing directories, don't scan dirs that reside on other storage devices. This lets you avoid scanning slow network mounts. This feature is not supported on all platforms"
},
{
"names": [
"-p",
"--path-to-ignore"
],
"description": "Provide a path to a specific .ignore file",
"takes_arg": true,
"arg": {
"name": "STRING",
"description": "The path to the ignore file",
"template": "filepaths"
}
},
{
"names": [
"--pager"
],
"description": "Use a pager such as less. Use --nopager to override. This option is also ignored if output is piped to another program",
"takes_arg": true,
"arg": {
"name": "COMMAND",
"description": "The pager",
"suggestions": [
"more",
"less",
"most"
]
}
},
{
"names": [
"--parallel"
],
"description": "Parse the input stream as a search term, not data to search. This is meant to be used with tools such as GNU parallel. For example: echo \"foo\nbar\nbaz\" | parallel \"ag {} .\" will run 3 instanc"
},
{
"names": [
"--print-long-lines"
],
"description": "Print matches on very long lines (> 2k characters by default)"
},
{
"names": [
"--passthrough",
"--passthru"
],
"description": "When searching a stream, print all lines even if they don't match"
},
{
"names": [
"-Q",
"--literal"
],
"description": "Do not parse PATTERN as a regular expression. Try to match it literally"
},
{
"names": [
"-r",
"--recurse"
],
"description": "Recurse into directories when searching. Default is true"
},
{
"names": [
"-s",
"--case-sensitive"
],
"description": "Match case-sensitively"
},
{
"names": [
"-S",
"--smart-case"
],
"description": "Match case-sensitively if there are any uppercase letters in PATTERN, case-insensitively otherwise. Enabled by default"
},
{
"names": [
"--search-binary"
],
"description": "Search binary files for matches"
},
{
"names": [
"--silent"
],
"description": "Suppress all log messages, including errors"
},
{
"names": [
"--stats"
],
"description": "Print stats (files scanned, time taken, etc)"
},
{
"names": [
"--stats-only"
],
"description": "Print stats (files scanned, time taken, etc) and nothing else"
},
{
"names": [
"-t",
"--all-text"
],
"description": "Search all text files. This doesn't include hidden files"
},
{
"names": [
"-u",
"--unrestricted"
],
"description": "Search all files. This ignores .ignore, .gitignore, etc. It searches binary and hidden files as well"
},
{
"names": [
"-U",
"--skip-vcs-ignores"
],
"description": "Ignore VCS ignore files (.gitignore, .hgignore), but still use .ignore"
},
{
"names": [
"-v",
"--invert-match"
],
"description": "Match every line not containing the specified pattern"
},
{
"names": [
"-V",
"--version"
],
"description": "Print version info"
},
{
"names": [
"--vimgrep"
],
"description": "Output results in the same form as Vim's :vimgrep /pattern/g Here is a ~/.vimrc configuration example: set grepprg=ag --vimgrep $* set grepformat=%f:%l:%c:%m Then use :grep to grep for something. Then"
},
{
"names": [
"-w",
"--word-regexp"
],
"description": "Only match whole words"
},
{
"names": [
"--workers"
],
"description": "Use NUM worker threads. Default is the number of CPU cores, with a max of 8",
"takes_arg": true,
"arg": {
"name": "NUM",
"description": "The NUM of worker threads"
}
},
{
"names": [
"-z",
"--search-zip"
],
"description": "Search contents of compressed files. Currently, gz and xz are supported. This option requires that ag is built with lzma and zlib"
},
{
"names": [
"-0",
"--null",
"--print0"
],
"description": "Separate the filenames with \u0000, rather than \n: this allows xargs -0 <command> to correctly process filenames containing spaces or newlines"
}
],
"args": [
{
"name": "pattern"
},
{
"name": "path",
"is_variadic": true,
"template": "filepaths"
}
]
}