{
  "id": "global",
  "name": "GNU Global",
  "homepage": "https://www.gnu.org/software/global/",
  "description": "Source code tagging system.",
  "executables": [
    "global",
    "gtags"
  ],
  "platforms": [
    "macos",
    "linux"
  ],
  "dotfiles": {
    "paths": [
      "~/.globalrc"
    ],
    "exclude": [],
    "secret": []
  },
  "commands": {
    "format": 1,
    "label": "Search tags",
    "description": "Find definitions, references or matching lines using GNU Global's tag files. Building the tag database (gtags), updating and the other output tuning options are left out.",
    "quality": "ai-draft",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": true,
      "short_attached": false,
      "short_bundles": true
    },
    "source": [
      {
        "id": "man",
        "kind": "manual",
        "url": "https://manpages.debian.org/bookworm/global/global.1.en.html",
        "revision": "Debian bookworm",
        "evidence": "<no command> pattern: Print tags which match to pattern. By default, print definition tags.\n-g, --grep pattern [files]: Print all lines which match to the pattern.\n-a, --absolute: Print absolute path names. By default, print relative path names.\n-C, --directory dir: Change the directory before doing all the work including parameter analysis.\n-d, --definition: Print locations of definitions.\n-i, --ignore-case: Ignore case distinctions in the pattern.\n-l, --local: Print only tags which exist under the current directory.\n--literal: Execute literal search instead of regular expression search.\n-r, --reference: Print reference tags.\n--result format: Print out using format, which may be one of: path (default), ctags, ctags-x, grep or cscope.\n-s, --symbol: Print other symbol tags.\n-S, --scope dir: Print only tags which exist under dir directory.\n-T, --through: Go through all the tag files listed in GTAGSLIBPATH.\n-x, --cxref: Use standard ctags cxref (with -x) format.\n"
      }
    ],
    "field": [
      {
        "id": "pattern",
        "label": "Pattern",
        "description": "Symbol name or regular expression; with grep mode, the text to match.",
        "type": "string",
        "position": 0,
        "sources": [
          "man"
        ]
      },
      {
        "id": "grep",
        "label": "Grep lines instead of tags",
        "type": "boolean",
        "option": [
          "--grep",
          "-g"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "reference",
        "label": "Reference tags",
        "type": "boolean",
        "option": [
          "--reference",
          "-r"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "definition",
        "label": "Definitions",
        "type": "boolean",
        "option": [
          "--definition",
          "-d"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "symbol",
        "label": "Other symbols",
        "type": "boolean",
        "option": [
          "--symbol",
          "-s"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "ignore_case",
        "label": "Ignore case",
        "type": "boolean",
        "option": [
          "--ignore-case",
          "-i"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "literal",
        "label": "Literal search",
        "type": "boolean",
        "option": [
          "--literal"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "local",
        "label": "Only current directory",
        "type": "boolean",
        "option": [
          "--local",
          "-l"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "scope",
        "label": "Only under directory",
        "type": "path",
        "option": [
          "--scope",
          "-S"
        ],
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      },
      {
        "id": "absolute",
        "label": "Absolute paths",
        "type": "boolean",
        "option": [
          "--absolute",
          "-a"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "cxref",
        "label": "Cross-reference format",
        "type": "boolean",
        "option": [
          "--cxref",
          "-x"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "result",
        "label": "Result format",
        "type": "enum",
        "option": [
          "--result"
        ],
        "choices": [
          {
            "value": "path",
            "label": "Path"
          },
          {
            "value": "ctags",
            "label": "ctags"
          },
          {
            "value": "ctags-x",
            "label": "ctags -x"
          },
          {
            "value": "grep",
            "label": "grep"
          },
          {
            "value": "cscope",
            "label": "cscope"
          }
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "through",
        "label": "Search all GTAGSLIBPATH tag files",
        "type": "boolean",
        "option": [
          "--through",
          "-T"
        ],
        "sources": [
          "man"
        ]
      },
      {
        "id": "directory",
        "label": "Run in directory",
        "type": "path",
        "option": [
          "--directory",
          "-C"
        ],
        "path": {
          "kind": "directory",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "man"
        ]
      }
    ],
    "task": [
      {
        "id": "definition",
        "label": "Find definition",
        "fields": [
          "pattern",
          "cxref",
          "absolute"
        ],
        "required": [
          "pattern"
        ]
      },
      {
        "id": "references",
        "label": "Find references",
        "fields": [
          "pattern",
          "reference",
          "cxref"
        ],
        "required": [
          "pattern",
          "reference"
        ],
        "set": {
          "reference": [
            true
          ],
          "cxref": [
            true
          ]
        },
        "lock": [
          "reference"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "pattern",
          "grep",
          "reference",
          "definition",
          "symbol",
          "ignore_case",
          "cxref"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "literal",
          "local",
          "scope",
          "absolute",
          "result",
          "through",
          "directory"
        ]
      }
    ]
  }
}
