{
  "id": "sed",
  "name": "sed",
  "description": "Stream editor for filtering and transforming text.",
  "executables": [
    "sed"
  ],
  "commands": {
    "format": 1,
    "label": "Edit text stream",
    "description": "Apply sed commands to files or standard input and print the result. In-place editing (-i) is left out because its backup-suffix syntax differs between BSD and GNU sed.",
    "quality": "ai-draft",
    "base": "fig:sed",
    "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/sed.ts",
        "license": "MIT"
      }
    ],
    "field": [
      {
        "id": "script",
        "label": "Script",
        "description": "A sed command such as s/old/new/g. Repeat to add more commands.",
        "type": "string",
        "option": [
          "-e"
        ],
        "multiple": true,
        "sources": [
          "fig"
        ]
      },
      {
        "id": "script_file",
        "label": "Script file",
        "type": "path",
        "option": [
          "-f"
        ],
        "path": {
          "kind": "file",
          "role": "input",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      },
      {
        "id": "extended",
        "label": "Extended regex",
        "description": "Use extended regular expressions.",
        "type": "boolean",
        "option": [
          "-E",
          "-r"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "quiet",
        "label": "Suppress automatic printing",
        "description": "Only print lines selected by a p command.",
        "type": "boolean",
        "option": [
          "-n"
        ],
        "sources": [
          "fig"
        ]
      },
      {
        "id": "unbuffered",
        "label": "Unbuffered output",
        "type": "boolean",
        "option": [
          "-u"
        ],
        "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",
          "must_exist": true
        },
        "sources": [
          "fig"
        ]
      }
    ],
    "task": [
      {
        "id": "substitute",
        "label": "Substitute text",
        "fields": [
          "script",
          "files",
          "extended"
        ],
        "required": [
          "script"
        ]
      },
      {
        "id": "print-lines",
        "label": "Print selected lines",
        "set": {
          "quiet": [
            true
          ]
        },
        "fields": [
          "script",
          "files",
          "quiet"
        ],
        "required": [
          "script"
        ]
      }
    ],
    "group": [
      {
        "id": "basic",
        "label": "Basic",
        "fields": [
          "script",
          "extended",
          "quiet",
          "files"
        ]
      },
      {
        "id": "advanced",
        "label": "Advanced",
        "fields": [
          "script_file",
          "unbuffered"
        ]
      }
    ]
  }
}
