{
  "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)",
      "exclusiveOn": [
        "--noaffinity"
      ]
    },
    {
      "names": [
        "--noaffinity"
      ],
      "description": "Don't set thread affinity (if platform supports it)",
      "exclusiveOn": [
        "--affinity"
      ]
    },
    {
      "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",
      "args": [
        {
          "name": "LINES",
          "description": "The amount of lines",
          "isOptional": true
        }
      ]
    },
    {
      "names": [
        "-B",
        "--before"
      ],
      "description": "Print lines before match",
      "args": [
        {
          "name": "LINES",
          "description": "The amount of lines",
          "isOptional": true
        }
      ]
    },
    {
      "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",
      "exclusiveOn": [
        "--nocolor"
      ]
    },
    {
      "names": [
        "--nocolor"
      ],
      "description": "Don't print color codes in results",
      "exclusiveOn": [
        "--color"
      ]
    },
    {
      "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",
      "args": [
        {
          "name": "LINES",
          "description": "The amount of lines",
          "isOptional": true
        }
      ]
    },
    {
      "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",
      "args": [
        {
          "name": "NUM",
          "description": "The depth in directories to search",
          "isOptional": true
        }
      ]
    },
    {
      "names": [
        "--filename"
      ],
      "description": "Print file names",
      "exclusiveOn": [
        "--nofilename"
      ]
    },
    {
      "names": [
        "--nofilename"
      ],
      "description": "Don't print file names",
      "exclusiveOn": [
        "--filename"
      ]
    },
    {
      "names": [
        "-f",
        "--follow"
      ],
      "description": "Follow symlinks",
      "exclusiveOn": [
        "--nofollow"
      ]
    },
    {
      "names": [
        "--nofollow"
      ],
      "description": "Don't follow symlinks",
      "exclusiveOn": [
        "-f",
        "--follow"
      ]
    },
    {
      "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",
      "exclusiveOn": [
        "--nogroup"
      ]
    },
    {
      "names": [
        "--nogroup"
      ],
      "description": "Refrains from lumping matches in the same file together, and instead places the filename at the start of each match line",
      "exclusiveOn": [
        "--group"
      ]
    },
    {
      "names": [
        "-g"
      ],
      "description": "Print filenames matching PATTERN",
      "args": [
        {
          "name": "PATTERN",
          "description": "The pattern to look for"
        }
      ]
    },
    {
      "names": [
        "-G",
        "--file-search-regex"
      ],
      "description": "Only search files whose names match PATTERN",
      "args": [
        {
          "name": "PATTERN",
          "description": "The pattern to look for"
        }
      ]
    },
    {
      "names": [
        "-H",
        "--heading"
      ],
      "description": "Print filenames above matching contents",
      "exclusiveOn": [
        "--noheading"
      ]
    },
    {
      "names": [
        "--noheading"
      ],
      "description": "Don't print filenames above matching contents",
      "exclusiveOn": [
        "-H",
        "--heading"
      ]
    },
    {
      "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",
      "args": [
        {
          "name": "PATTERN",
          "description": "The pattern to look for",
          "template": "filepaths"
        }
      ]
    },
    {
      "names": [
        "--ignore-dir"
      ],
      "description": "Alias for --ignore for compatibility with ack",
      "args": [
        {
          "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",
      "args": [
        {
          "name": "NUM",
          "description": "The number of matches to skip after",
          "isOptional": true
        }
      ]
    },
    {
      "names": [
        "--mmap"
      ],
      "description": "Use of memory-mapped I/O. Defaults to true on platforms where mmap() is faster than read(). (All but macOS.)",
      "exclusiveOn": [
        "--nommap"
      ]
    },
    {
      "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.)",
      "exclusiveOn": [
        "--mmap"
      ]
    },
    {
      "names": [
        "--multiline"
      ],
      "description": "Match regexes across newlines",
      "exclusiveOn": [
        "--nomultiline"
      ]
    },
    {
      "names": [
        "--nomultiline"
      ],
      "description": "Don't match regexes across newlines",
      "exclusiveOn": [
        "--multiline"
      ]
    },
    {
      "names": [
        "-n",
        "--norecurse"
      ],
      "description": "Don't recurse into directories",
      "exclusiveOn": [
        "-r",
        "--recurse"
      ]
    },
    {
      "names": [
        "--numbers"
      ],
      "description": "Print line numbers",
      "exclusiveOn": [
        "--nonumbers"
      ]
    },
    {
      "names": [
        "--nonumbers"
      ],
      "description": "Don't print line numbers",
      "exclusiveOn": [
        "--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",
      "args": [
        {
          "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",
      "args": [
        {
          "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 instances of ag, searching the current directory for \"foo\", \"bar\", and \"baz\""
    },
    {
      "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",
      "exclusiveOn": [
        "-n",
        "--norecurse"
      ]
    },
    {
      "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 use :copen, :cn, :cp, etc. to navigate through the matches"
    },
    {
      "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",
      "args": [
        {
          "name": "NUM",
          "description": "The NUM of worker threads",
          "isOptional": true
        }
      ]
    },
    {
      "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",
      "isOptional": true
    },
    {
      "name": "path",
      "isOptional": true,
      "isVariadic": true,
      "template": "filepaths"
    }
  ]
}
