{
  "id": "split",
  "name": "split",
  "description": "Split a file into pieces.",
  "executables": [
    "split"
  ],
  "commands": {
    "format": 1,
    "label": "Split file",
    "description": "Split a file by lines, bytes or pattern. Reads standard input when no file is given. Use only one of lines, bytes or pattern.",
    "quality": "ai-draft",
    "base": "fig:split",
    "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/split.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "file",
        "label": "File to split",
        "type": "path",
        "position": 0,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "prefix",
        "label": "Output prefix",
        "description": "Default is x.",
        "type": "string",
        "position": 1,
        "suggestions": [
          {
            "value": "x",
            "label": "x"
          }
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "lines",
        "label": "Lines per file",
        "type": "integer",
        "option": [
          "-l"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "bytes",
        "label": "Bytes per file",
        "description": "A number with optional k, m or g suffix.",
        "type": "string",
        "option": [
          "-b"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "pattern",
        "label": "Split at pattern",
        "description": "Extended regular expression; the matching line starts the next file.",
        "type": "string",
        "option": [
          "-p"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "numeric",
        "label": "Numeric suffixes",
        "type": "boolean",
        "option": [
          "-d"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "suffix_len",
        "label": "Suffix length",
        "type": "integer",
        "option": [
          "-a"
        ],
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "lines",
        "label": "Split by lines",
        "fields": [
          "file",
          "prefix",
          "lines",
          "numeric",
          "suffix_len"
        ],
        "required": [
          "file",
          "lines"
        ]
      },
      {
        "id": "bytes",
        "label": "Split by size",
        "fields": [
          "file",
          "prefix",
          "bytes",
          "numeric",
          "suffix_len"
        ],
        "required": [
          "file",
          "bytes"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "file",
          "prefix",
          "lines",
          "bytes",
          "pattern",
          "numeric",
          "suffix_len"
        ]
      }
    ]
  }
}
