{
  "id": "sudo",
  "name": "sudo",
  "description": "Execute a command as the superuser or another user.",
  "executables": [
    "sudo"
  ],
  "commands": {
    "format": 1,
    "label": "Run as another user",
    "description": "Run a command with elevated privileges, optionally as a given user or group. Other sudo options are not in this form.",
    "quality": "ai-draft",
    "base": "fig:sudo",
    "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/sudo.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "user",
        "label": "Run as user",
        "type": "string",
        "option": [
          "--user",
          "-u"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "group",
        "label": "Run as group",
        "type": "string",
        "option": [
          "--group",
          "-g"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "command",
        "label": "Command",
        "description": "Command and its arguments to run with elevated permissions.",
        "type": "string",
        "position": 0,
        "multiple": true,
        "min": 1,
        "effect": "exec",
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "root",
        "label": "Run as root",
        "fields": [
          "command"
        ],
        "required": [
          "command"
        ]
      },
      {
        "id": "as-user",
        "label": "Run as another user",
        "fields": [
          "user",
          "group",
          "command"
        ],
        "required": [
          "user",
          "command"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "command",
          "user",
          "group"
        ]
      }
    ]
  }
}
