{
  "id": "cut",
  "name": "cut",
  "description": "Cut out selected portions of each line of a file.",
  "executables": [
    "cut"
  ],
  "commands": {
    "format": 1,
    "label": "Cut columns or fields",
    "description": "Select bytes, characters or delimited fields from each line of the given files or standard input.",
    "quality": "ai-draft",
    "base": "fig:cut",
    "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/cut.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "fields",
        "label": "Fields",
        "description": "Field positions, e.g. 1,3 or 2-4.",
        "type": "string",
        "option": [
          "-f"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "delimiter",
        "label": "Delimiter",
        "type": "string",
        "option": [
          "-d"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "chars",
        "label": "Characters",
        "type": "string",
        "option": [
          "-c"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "bytes",
        "label": "Bytes",
        "type": "string",
        "option": [
          "-b"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "only_delimited",
        "label": "Only lines with a delimiter",
        "type": "boolean",
        "option": [
          "-s"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "files",
        "label": "Input files",
        "description": "Leave empty to read standard input.",
        "type": "path",
        "position": 0,
        "multiple": true,
        "path": {
          "kind": "file",
          "role": "input"
        },
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "fields",
        "label": "Extract fields",
        "fields": [
          "fields",
          "delimiter",
          "only_delimited",
          "files"
        ],
        "required": [
          "fields"
        ]
      },
      {
        "id": "chars",
        "label": "Extract characters",
        "fields": [
          "chars",
          "files"
        ],
        "required": [
          "chars"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "fields",
          "delimiter",
          "chars",
          "bytes",
          "only_delimited",
          "files"
        ]
      }
    ]
  }
}
