{
  "id": "rg",
  "name": "ripgrep",
  "description": "Recursively search files for lines matching a regular expression.",
  "executables": [
    "rg"
  ],
  "commands": {
    "format": 1,
    "label": "Search files",
    "description": "Search a directory tree for a pattern with ripgrep. Covers common matching, context and filtering flags only.",
    "quality": "ai-draft",
    "base": "fig:rg",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/rg.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "pattern",
        "label": "Pattern",
        "type": "string",
        "position": 0,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "paths",
        "label": "Files or directories",
        "type": "path",
        "position": 1,
        "multiple": true,
        "path": {
          "kind": "any",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "ignore_case_smart",
        "label": "Smart case",
        "type": "boolean",
        "option": [
          "-S",
          "--smart-case"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "case_sensitive",
        "label": "Case sensitive",
        "type": "boolean",
        "option": [
          "-s",
          "--case-sensitive"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "fixed_strings",
        "label": "Literal string",
        "type": "boolean",
        "option": [
          "-F",
          "--fixed-strings"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "word",
        "label": "Whole words only",
        "type": "boolean",
        "option": [
          "-w",
          "--word-regexp"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "invert",
        "label": "Invert match",
        "type": "boolean",
        "option": [
          "-v",
          "--invert-match"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "files_with_matches",
        "label": "List matching files only",
        "type": "boolean",
        "option": [
          "-l",
          "--files-with-matches"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "count",
        "label": "Count matching lines",
        "type": "boolean",
        "option": [
          "-c",
          "--count"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "context",
        "label": "Context lines",
        "type": "integer",
        "option": [
          "-C",
          "--context"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "glob",
        "label": "Include or exclude glob",
        "type": "string",
        "option": [
          "-g",
          "--glob"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "file_type",
        "label": "File type",
        "type": "string",
        "option": [
          "-t",
          "--type"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "hidden",
        "label": "Include hidden files",
        "type": "boolean",
        "option": [
          "--hidden"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_ignore",
        "label": "Ignore .gitignore rules",
        "type": "boolean",
        "option": [
          "--no-ignore"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "search",
        "label": "Search with smart case",
        "set": {
          "ignore_case_smart": [
            true
          ]
        },
        "fields": [
          "pattern",
          "paths",
          "ignore_case_smart",
          "glob",
          "file_type",
          "context"
        ],
        "required": [
          "pattern"
        ]
      },
      {
        "id": "list-files",
        "label": "List files containing a match",
        "set": {
          "files_with_matches": [
            true
          ]
        },
        "lock": [
          "files_with_matches"
        ],
        "fields": [
          "pattern",
          "paths",
          "files_with_matches",
          "hidden"
        ],
        "required": [
          "pattern"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "pattern",
          "paths",
          "ignore_case_smart",
          "case_sensitive",
          "fixed_strings",
          "word",
          "context",
          "glob",
          "file_type"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "invert",
          "files_with_matches",
          "count",
          "hidden",
          "no_ignore"
        ]
      }
    ]
  }
}
