{
  "id": "cp",
  "name": "cp",
  "description": "Copy files and directories.",
  "executables": [
    "cp"
  ],
  "commands": {
    "format": 1,
    "label": "Copy files",
    "description": "Copy one or more sources to a target. Symlink-handling options (-H, -L, -P) and macOS-specific options are left out.",
    "quality": "ai-draft",
    "base": "fig:cp",
    "parser": {
      "end_of_options": "--",
      "interleave": "permute",
      "long_equals": false,
      "short_attached": true,
      "short_bundles": true
    },
    "source": [
      {
        "id": "fig",
        "kind": "completion",
        "url": "https://github.com/withfig/autocomplete/blob/master/src/cp.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "recursive",
        "label": "Copy directories recursively",
        "type": "boolean",
        "option": [
          "-R"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "archive",
        "label": "Archive (preserve attributes)",
        "type": "boolean",
        "option": [
          "-a"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "interactive",
        "label": "Prompt before overwriting",
        "type": "boolean",
        "option": [
          "-i"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "no_clobber",
        "label": "Never overwrite existing files",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "force",
        "label": "Force (remove unopenable destination)",
        "type": "boolean",
        "option": [
          "-f"
        ],
        "effect": "overwrite",
        "sources": [
          "fig"
        ]
      },
      {
        "id": "verbose",
        "label": "Verbose",
        "type": "boolean",
        "option": [
          "-v"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "source",
        "label": "Sources",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "input",
          "must_exist": true
        },
        "position": 0,
        "multiple": true,
        "min": 1,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "target",
        "label": "Target",
        "type": "path",
        "path": {
          "kind": "any",
          "role": "output"
        },
        "position": 1,
        "min": 1,
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "copy-dir",
        "label": "Copy a directory",
        "set": {
          "recursive": [
            true
          ]
        },
        "lock": [
          "recursive"
        ],
        "fields": [
          "source",
          "target",
          "no_clobber",
          "verbose"
        ],
        "required": [
          "source",
          "target"
        ]
      },
      {
        "id": "safe-copy",
        "label": "Copy without overwriting",
        "set": {
          "no_clobber": [
            true
          ]
        },
        "lock": [
          "no_clobber"
        ],
        "fields": [
          "source",
          "target",
          "recursive",
          "verbose"
        ],
        "required": [
          "source",
          "target"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "source",
          "target",
          "recursive",
          "verbose"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "archive",
          "interactive",
          "no_clobber",
          "force"
        ]
      }
    ]
  }
}
