{
  "id": "chmod",
  "name": "chmod",
  "description": "Change file modes or Access Control Lists.",
  "executables": [
    "chmod"
  ],
  "commands": {
    "format": 1,
    "label": "Change file mode",
    "description": "Set permissions on one or more files. Symlink-handling flags -H, -L and -P and ACL options are left out.",
    "quality": "ai-draft",
    "base": "fig:chmod",
    "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/chmod.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "mode",
        "label": "Mode",
        "description": "Symbolic (u+x) or octal (644) mode.",
        "type": "string",
        "position": 0,
        "min": 1,
        "suggestions": [
          {
            "value": "u+x",
            "label": "Make executable for owner"
          },
          {
            "value": "a+rx",
            "label": "Read/execute for all"
          },
          {
            "value": "644",
            "label": "rw-r--r--"
          },
          {
            "value": "755",
            "label": "rwxr-xr-x"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "files",
        "label": "Files",
        "type": "path",
        "position": 1,
        "multiple": true,
        "min": 1,
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": true,
          "transforms": [
            "dot_slash_if_dash"
          ]
        },
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "recursive",
        "label": "Recursive",
        "type": "boolean",
        "option": [
          "-R"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "count",
        "option": [
          "-v"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "quiet",
        "label": "Suppress errors",
        "type": "boolean",
        "option": [
          "-f"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "link_itself",
        "label": "Change symlink itself",
        "type": "boolean",
        "option": [
          "-h"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "set_mode",
        "label": "Set mode",
        "fields": [
          "mode",
          "files"
        ],
        "required": [
          "mode",
          "files"
        ]
      },
      {
        "id": "set_mode_recursive",
        "label": "Set mode recursively",
        "fields": [
          "mode",
          "files",
          "recursive",
          "verbose"
        ],
        "required": [
          "mode",
          "files"
        ],
        "set": {
          "recursive": [
            true
          ]
        }
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "mode",
          "files",
          "recursive"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "verbose",
          "quiet",
          "link_itself"
        ]
      }
    ]
  }
}
