{
  "id": "tar",
  "name": "tar",
  "description": "tar creates, lists and extracts archive files.",
  "executables": [
    "tar"
  ],
  "commands": {
    "format": 1,
    "label": "Archive files",
    "description": "Create, list or extract a tar archive. Choose a job in the subcommand tabs; less common options (incremental backups, multi-volume, ACLs, pax options) are left out.",
    "quality": "ai-draft",
    "base": "fig:tar",
    "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/tar.ts",
        "license": "MIT"
      }
    ],
    "subcommand": [
      {
        "path": [
          "c"
        ],
        "label": "Create archive",
        "description": "Pack files and directories into a new archive. Compression is chosen by flag.",
        "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/tar.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "archive",
            "label": "Archive file",
            "type": "path",
            "option": [
              "-f",
              "--file"
            ],
            "path": {
              "kind": "file",
              "role": "output"
            },
            "effect": "overwrite",
            "min": 1,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "gzip",
            "label": "gzip compression",
            "type": "boolean",
            "option": [
              "-z",
              "--gzip"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "bzip2",
            "label": "bzip2 compression",
            "type": "boolean",
            "option": [
              "-j",
              "--bzip2"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "xz",
            "label": "xz compression",
            "type": "boolean",
            "option": [
              "-J",
              "--xz"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "zstd",
            "label": "zstd compression",
            "type": "boolean",
            "option": [
              "--zstd"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "-v",
              "--verbose"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exclude",
            "label": "Exclude patterns",
            "type": "string",
            "option": [
              "--exclude"
            ],
            "multiple": true,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "exclude_vcs",
            "label": "Exclude VCS directories",
            "type": "boolean",
            "option": [
              "--exclude-vcs"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "dereference",
            "label": "Follow symlinks",
            "type": "boolean",
            "option": [
              "-h",
              "--dereference"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "files",
            "label": "Files and directories",
            "type": "path",
            "position": 0,
            "multiple": true,
            "min": 1,
            "path": {
              "kind": "any",
              "role": "input",
              "must_exist": true
            },
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "targz",
            "label": "Create .tar.gz",
            "fields": [
              "archive",
              "gzip",
              "files"
            ],
            "required": [
              "archive",
              "files"
            ],
            "set": {
              "gzip": [
                true
              ]
            }
          },
          {
            "id": "tarxz",
            "label": "Create .tar.xz",
            "fields": [
              "archive",
              "xz",
              "files"
            ],
            "required": [
              "archive",
              "files"
            ],
            "set": {
              "xz": [
                true
              ]
            }
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "archive",
              "files",
              "gzip",
              "bzip2",
              "xz",
              "zstd",
              "verbose"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "exclude",
              "exclude_vcs",
              "dereference"
            ]
          }
        ]
      },
      {
        "path": [
          "x"
        ],
        "label": "Extract archive",
        "description": "Unpack an archive into a directory. Existing files are replaced unless a keep option is set.",
        "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/tar.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "archive",
            "label": "Archive file",
            "type": "path",
            "option": [
              "-f",
              "--file"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "min": 1,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "directory",
            "label": "Extract into directory",
            "type": "path",
            "option": [
              "-C",
              "--directory"
            ],
            "path": {
              "kind": "directory",
              "role": "output"
            },
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose",
            "type": "boolean",
            "option": [
              "-v",
              "--verbose"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "strip_components",
            "label": "Strip leading path components",
            "type": "integer",
            "option": [
              "--strip-components"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "keep_old",
            "label": "Keep existing files",
            "type": "boolean",
            "option": [
              "-k",
              "--keep-old-files"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "preserve_permissions",
            "label": "Preserve permissions",
            "type": "boolean",
            "option": [
              "-p",
              "--preserve-permissions"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "to_stdout",
            "label": "Write to standard output",
            "type": "boolean",
            "option": [
              "-O",
              "--to-stdout"
            ],
            "sources": [
              "fig"
            ]
          },
          {
            "id": "members",
            "label": "Only these members",
            "description": "Leave empty to extract everything.",
            "type": "string",
            "position": 0,
            "multiple": true,
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "extract_all",
            "label": "Extract everything",
            "fields": [
              "archive",
              "directory"
            ],
            "required": [
              "archive"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "archive",
              "directory",
              "verbose",
              "members"
            ]
          },
          {
            "id": "advanced",
            "label": "Advanced",
            "fields": [
              "strip_components",
              "keep_old",
              "preserve_permissions",
              "to_stdout"
            ]
          }
        ]
      },
      {
        "path": [
          "t"
        ],
        "label": "List archive",
        "description": "List the members of an archive without extracting.",
        "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/tar.ts",
            "license": "MIT"
          }
        ],
        "field": [
          {
            "id": "archive",
            "label": "Archive file",
            "type": "path",
            "option": [
              "-f",
              "--file"
            ],
            "path": {
              "kind": "file",
              "role": "input",
              "must_exist": true
            },
            "min": 1,
            "sources": [
              "fig"
            ]
          },
          {
            "id": "verbose",
            "label": "Verbose (long listing)",
            "type": "boolean",
            "option": [
              "-v",
              "--verbose"
            ],
            "sources": [
              "fig"
            ]
          }
        ],
        "task": [
          {
            "id": "list",
            "label": "List contents",
            "fields": [
              "archive",
              "verbose"
            ],
            "required": [
              "archive"
            ]
          }
        ],
        "group": [
          {
            "id": "basic",
            "label": "Basic",
            "fields": [
              "archive",
              "verbose"
            ]
          }
        ]
      }
    ]
  }
}
