
using namespace System.Management.Automation
using namespace System.Management.Automation.Language

Register-ArgumentCompleter -Native -CommandName 'bootc' -ScriptBlock {
    param($wordToComplete, $commandAst, $cursorPosition)

    $commandElements = $commandAst.CommandElements
    $command = @(
        'bootc'
        for ($i = 1; $i -lt $commandElements.Count; $i++) {
            $element = $commandElements[$i]
            if ($element -isnot [StringConstantExpressionAst] -or
                $element.StringConstantType -ne [StringConstantType]::BareWord -or
                $element.Value.StartsWith('-') -or
                $element.Value -eq $wordToComplete) {
                break
        }
        $element.Value
    }) -join ';'

    $completions = @(switch ($command) {
        'bootc' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('-V', '-V ', [CompletionResultType]::ParameterName, 'Print version')
            [CompletionResult]::new('--version', '--version', [CompletionResultType]::ParameterName, 'Print version')
            [CompletionResult]::new('upgrade', 'upgrade', [CompletionResultType]::ParameterValue, 'Download and queue an updated container image to apply')
            [CompletionResult]::new('switch', 'switch', [CompletionResultType]::ParameterValue, 'Target a new container image reference to boot')
            [CompletionResult]::new('rollback', 'rollback', [CompletionResultType]::ParameterValue, 'Change the bootloader entry ordering; the deployment under `rollback` will be queued for the next boot, and the current will become rollback.  If there is a `staged` entry (an unapplied, queued upgrade) then it will be discarded')
            [CompletionResult]::new('edit', 'edit', [CompletionResultType]::ParameterValue, 'Apply full changes to the host specification')
            [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Display status')
            [CompletionResult]::new('usr-overlay', 'usr-overlay', [CompletionResultType]::ParameterValue, 'Add a transient overlayfs on `/usr`')
            [CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install the running container to a target')
            [CompletionResult]::new('container', 'container', [CompletionResultType]::ParameterValue, 'Operations which can be executed as part of a container build')
            [CompletionResult]::new('image', 'image', [CompletionResultType]::ParameterValue, 'Operations on container images')
            [CompletionResult]::new('loader-entries', 'loader-entries', [CompletionResultType]::ParameterValue, 'Operations on Boot Loader Specification (BLS) entries')
            [CompletionResult]::new('exec-in-host-mount-namespace', 'exec-in-host-mount-namespace', [CompletionResultType]::ParameterValue, 'Execute the given command in the host mount namespace')
            [CompletionResult]::new('state', 'state', [CompletionResultType]::ParameterValue, 'Modify the state of the system')
            [CompletionResult]::new('internals', 'internals', [CompletionResultType]::ParameterValue, 'Hidden, internal only options')
            [CompletionResult]::new('composefs-finalize-staged', 'composefs-finalize-staged', [CompletionResultType]::ParameterValue, 'composefs-finalize-staged')
            [CompletionResult]::new('config-diff', 'config-diff', [CompletionResultType]::ParameterValue, 'Diff current /etc configuration versus default')
            [CompletionResult]::new('completion', 'completion', [CompletionResultType]::ParameterValue, 'Generate shell completion script for supported shells')
            [CompletionResult]::new('delete-deployment', 'delete-deployment', [CompletionResultType]::ParameterValue, 'delete-deployment')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;upgrade' {
            [CompletionResult]::new('--soft-reboot', '--soft-reboot', [CompletionResultType]::ParameterName, 'Configure soft reboot behavior')
            [CompletionResult]::new('--tag', '--tag', [CompletionResultType]::ParameterName, 'Upgrade to a different tag of the currently booted image')
            [CompletionResult]::new('--progress-fd', '--progress-fd', [CompletionResultType]::ParameterName, 'File descriptor number which must refer to an open pipe')
            [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Don''t display progress')
            [CompletionResult]::new('--check', '--check', [CompletionResultType]::ParameterName, 'Check if an update is available without applying it')
            [CompletionResult]::new('--apply', '--apply', [CompletionResultType]::ParameterName, 'Restart or reboot into the new target image')
            [CompletionResult]::new('--download-only', '--download-only', [CompletionResultType]::ParameterName, 'Download and stage the update without applying it')
            [CompletionResult]::new('--from-downloaded', '--from-downloaded', [CompletionResultType]::ParameterName, 'Apply a staged deployment that was previously downloaded with --download-only')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;switch' {
            [CompletionResult]::new('--soft-reboot', '--soft-reboot', [CompletionResultType]::ParameterName, 'Configure soft reboot behavior')
            [CompletionResult]::new('--transport', '--transport', [CompletionResultType]::ParameterName, 'The transport; e.g. registry, oci, oci-archive, docker-daemon, containers-storage.  Defaults to `registry`')
            [CompletionResult]::new('--progress-fd', '--progress-fd', [CompletionResultType]::ParameterName, 'File descriptor number which must refer to an open pipe')
            [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Don''t display progress')
            [CompletionResult]::new('--apply', '--apply', [CompletionResultType]::ParameterName, 'Restart or reboot into the new target image')
            [CompletionResult]::new('--no-signature-verification', '--no-signature-verification', [CompletionResultType]::ParameterName, 'This argument is deprecated and does nothing')
            [CompletionResult]::new('--enforce-container-sigpolicy', '--enforce-container-sigpolicy', [CompletionResultType]::ParameterName, 'This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op)')
            [CompletionResult]::new('--mutate-in-place', '--mutate-in-place', [CompletionResultType]::ParameterName, 'Don''t create a new deployment, but directly mutate the booted state. This is hidden because it''s not something we generally expect to be done, but this can be used in e.g. Anaconda %post to fixup')
            [CompletionResult]::new('--retain', '--retain', [CompletionResultType]::ParameterName, 'Retain reference to currently booted image')
            [CompletionResult]::new('--experimental-unified-storage', '--experimental-unified-storage', [CompletionResultType]::ParameterName, 'Use unified storage path to pull images (experimental)')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;rollback' {
            [CompletionResult]::new('--soft-reboot', '--soft-reboot', [CompletionResultType]::ParameterName, 'Configure soft reboot behavior')
            [CompletionResult]::new('--apply', '--apply', [CompletionResultType]::ParameterName, 'Restart or reboot into the rollback image')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;edit' {
            [CompletionResult]::new('-f', '-f', [CompletionResultType]::ParameterName, 'Use filename to edit system specification')
            [CompletionResult]::new('--filename', '--filename', [CompletionResultType]::ParameterName, 'Use filename to edit system specification')
            [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Don''t display progress')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;status' {
            [CompletionResult]::new('--format', '--format', [CompletionResultType]::ParameterName, 'The output format')
            [CompletionResult]::new('--format-version', '--format-version', [CompletionResultType]::ParameterName, 'The desired format version. There is currently one supported version, which is exposed as both `0` and `1`. Pass this option to explicitly request it; it is possible that another future version 2 or newer will be supported in the future')
            [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output in JSON format')
            [CompletionResult]::new('--booted', '--booted', [CompletionResultType]::ParameterName, 'Only display status for the booted deployment')
            [CompletionResult]::new('-v', '-v', [CompletionResultType]::ParameterName, 'Include additional fields in human readable format')
            [CompletionResult]::new('--verbose', '--verbose', [CompletionResultType]::ParameterName, 'Include additional fields in human readable format')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;usr-overlay' {
            [CompletionResult]::new('--read-only', '--read-only', [CompletionResultType]::ParameterName, 'Mount the overlayfs as read-only. A read-only overlayfs is useful since it may be remounted as read/write in a private mount namespace and written to while the mount point remains read-only to the rest of the system')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;install' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('to-disk', 'to-disk', [CompletionResultType]::ParameterValue, 'Install to the target block device')
            [CompletionResult]::new('to-filesystem', 'to-filesystem', [CompletionResultType]::ParameterValue, 'Install to an externally created filesystem structure')
            [CompletionResult]::new('to-existing-root', 'to-existing-root', [CompletionResultType]::ParameterValue, 'Install to the host root filesystem')
            [CompletionResult]::new('reset', 'reset', [CompletionResultType]::ParameterValue, 'Nondestructively create a fresh installation state inside an existing bootc system')
            [CompletionResult]::new('finalize', 'finalize', [CompletionResultType]::ParameterValue, 'Execute this as the penultimate step of an installation using `install to-filesystem`')
            [CompletionResult]::new('ensure-completion', 'ensure-completion', [CompletionResultType]::ParameterValue, 'Intended for use in environments that are performing an ostree-based installation, not bootc')
            [CompletionResult]::new('print-configuration', 'print-configuration', [CompletionResultType]::ParameterValue, 'Output JSON to stdout that contains the merged installation configuration as it may be relevant to calling processes using `install to-filesystem` that in particular want to discover the desired root filesystem type from the container image')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;install;to-disk' {
            [CompletionResult]::new('--block-setup', '--block-setup', [CompletionResultType]::ParameterName, 'Target root block device setup')
            [CompletionResult]::new('--filesystem', '--filesystem', [CompletionResultType]::ParameterName, 'Target root filesystem type')
            [CompletionResult]::new('--root-size', '--root-size', [CompletionResultType]::ParameterName, 'Size of the root partition (default specifier: M).  Allowed specifiers: M (mebibytes), G (gibibytes), T (tebibytes)')
            [CompletionResult]::new('--source-imgref', '--source-imgref', [CompletionResultType]::ParameterName, 'Install the system from an explicitly given source')
            [CompletionResult]::new('--target-transport', '--target-transport', [CompletionResultType]::ParameterName, 'The transport; e.g. oci, oci-archive, containers-storage.  Defaults to `registry`')
            [CompletionResult]::new('--target-imgref', '--target-imgref', [CompletionResultType]::ParameterName, 'Specify the image to fetch for subsequent updates')
            [CompletionResult]::new('--karg', '--karg', [CompletionResultType]::ParameterName, 'Add a kernel argument.  This option can be provided multiple times')
            [CompletionResult]::new('--karg-delete', '--karg-delete', [CompletionResultType]::ParameterName, 'Remove a kernel argument.  This option can be provided multiple times')
            [CompletionResult]::new('--root-ssh-authorized-keys', '--root-ssh-authorized-keys', [CompletionResultType]::ParameterName, 'The path to an `authorized_keys` that will be injected into the `root` account')
            [CompletionResult]::new('--bound-images', '--bound-images', [CompletionResultType]::ParameterName, 'How should logically bound images be retrieved')
            [CompletionResult]::new('--stateroot', '--stateroot', [CompletionResultType]::ParameterName, 'The stateroot name to use. Defaults to `default`')
            [CompletionResult]::new('--bootloader', '--bootloader', [CompletionResultType]::ParameterName, 'The bootloader to use')
            [CompletionResult]::new('--uki-addon', '--uki-addon', [CompletionResultType]::ParameterName, 'Name of the UKI addons to install without the ".efi.addon" suffix. This option can be provided multiple times if multiple addons are to be installed')
            [CompletionResult]::new('--wipe', '--wipe', [CompletionResultType]::ParameterName, 'Automatically wipe all existing data on device')
            [CompletionResult]::new('--target-no-signature-verification', '--target-no-signature-verification', [CompletionResultType]::ParameterName, 'This command line argument does nothing; it exists for compatibility')
            [CompletionResult]::new('--enforce-container-sigpolicy', '--enforce-container-sigpolicy', [CompletionResultType]::ParameterName, 'This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op).  Enabling this option enforces that `/etc/containers/policy.json` includes a default policy which requires signatures')
            [CompletionResult]::new('--run-fetch-check', '--run-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--skip-fetch-check', '--skip-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--experimental-unified-storage', '--experimental-unified-storage', [CompletionResultType]::ParameterName, 'Use unified storage path to pull images (experimental)')
            [CompletionResult]::new('--disable-selinux', '--disable-selinux', [CompletionResultType]::ParameterName, 'Disable SELinux in the target (installed) system')
            [CompletionResult]::new('--generic-image', '--generic-image', [CompletionResultType]::ParameterName, 'Perform configuration changes suitable for a "generic" disk image. At the moment:')
            [CompletionResult]::new('--bootupd-skip-boot-uuid', '--bootupd-skip-boot-uuid', [CompletionResultType]::ParameterName, 'Don''t pass --write-uuid to bootupd during bootloader installation')
            [CompletionResult]::new('--via-loopback', '--via-loopback', [CompletionResultType]::ParameterName, 'Instead of targeting a block device, write to a file via loopback')
            [CompletionResult]::new('--composefs-backend', '--composefs-backend', [CompletionResultType]::ParameterName, 'If true, composefs backend is used, else ostree backend is used')
            [CompletionResult]::new('--allow-missing-verity', '--allow-missing-verity', [CompletionResultType]::ParameterName, 'Make fs-verity validation optional in case the filesystem doesn''t support it')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;install;to-filesystem' {
            [CompletionResult]::new('--root-mount-spec', '--root-mount-spec', [CompletionResultType]::ParameterName, 'Source device specification for the root filesystem.  For example, `UUID=2e9f4241-229b-4202-8429-62d2302382e1`. If not provided, the UUID of the target filesystem will be used. This option is provided as some use cases might prefer to mount by a label instead via e.g. `LABEL=rootfs`')
            [CompletionResult]::new('--boot-mount-spec', '--boot-mount-spec', [CompletionResultType]::ParameterName, 'Mount specification for the /boot filesystem')
            [CompletionResult]::new('--replace', '--replace', [CompletionResultType]::ParameterName, 'Initialize the system in-place; at the moment, only one mode for this is implemented. In the future, it may also be supported to set up an explicit "dual boot" system')
            [CompletionResult]::new('--source-imgref', '--source-imgref', [CompletionResultType]::ParameterName, 'Install the system from an explicitly given source')
            [CompletionResult]::new('--target-transport', '--target-transport', [CompletionResultType]::ParameterName, 'The transport; e.g. oci, oci-archive, containers-storage.  Defaults to `registry`')
            [CompletionResult]::new('--target-imgref', '--target-imgref', [CompletionResultType]::ParameterName, 'Specify the image to fetch for subsequent updates')
            [CompletionResult]::new('--karg', '--karg', [CompletionResultType]::ParameterName, 'Add a kernel argument.  This option can be provided multiple times')
            [CompletionResult]::new('--karg-delete', '--karg-delete', [CompletionResultType]::ParameterName, 'Remove a kernel argument.  This option can be provided multiple times')
            [CompletionResult]::new('--root-ssh-authorized-keys', '--root-ssh-authorized-keys', [CompletionResultType]::ParameterName, 'The path to an `authorized_keys` that will be injected into the `root` account')
            [CompletionResult]::new('--bound-images', '--bound-images', [CompletionResultType]::ParameterName, 'How should logically bound images be retrieved')
            [CompletionResult]::new('--stateroot', '--stateroot', [CompletionResultType]::ParameterName, 'The stateroot name to use. Defaults to `default`')
            [CompletionResult]::new('--bootloader', '--bootloader', [CompletionResultType]::ParameterName, 'The bootloader to use')
            [CompletionResult]::new('--uki-addon', '--uki-addon', [CompletionResultType]::ParameterName, 'Name of the UKI addons to install without the ".efi.addon" suffix. This option can be provided multiple times if multiple addons are to be installed')
            [CompletionResult]::new('--acknowledge-destructive', '--acknowledge-destructive', [CompletionResultType]::ParameterName, 'If the target is the running system''s root filesystem, this will skip any warnings')
            [CompletionResult]::new('--skip-finalize', '--skip-finalize', [CompletionResultType]::ParameterName, 'The default mode is to "finalize" the target filesystem by invoking `fstrim` and similar operations, and finally mounting it readonly.  This option skips those operations.  It is then the responsibility of the invoking code to perform those operations')
            [CompletionResult]::new('--target-no-signature-verification', '--target-no-signature-verification', [CompletionResultType]::ParameterName, 'This command line argument does nothing; it exists for compatibility')
            [CompletionResult]::new('--enforce-container-sigpolicy', '--enforce-container-sigpolicy', [CompletionResultType]::ParameterName, 'This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op).  Enabling this option enforces that `/etc/containers/policy.json` includes a default policy which requires signatures')
            [CompletionResult]::new('--run-fetch-check', '--run-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--skip-fetch-check', '--skip-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--experimental-unified-storage', '--experimental-unified-storage', [CompletionResultType]::ParameterName, 'Use unified storage path to pull images (experimental)')
            [CompletionResult]::new('--disable-selinux', '--disable-selinux', [CompletionResultType]::ParameterName, 'Disable SELinux in the target (installed) system')
            [CompletionResult]::new('--generic-image', '--generic-image', [CompletionResultType]::ParameterName, 'Perform configuration changes suitable for a "generic" disk image. At the moment:')
            [CompletionResult]::new('--bootupd-skip-boot-uuid', '--bootupd-skip-boot-uuid', [CompletionResultType]::ParameterName, 'Don''t pass --write-uuid to bootupd during bootloader installation')
            [CompletionResult]::new('--composefs-backend', '--composefs-backend', [CompletionResultType]::ParameterName, 'If true, composefs backend is used, else ostree backend is used')
            [CompletionResult]::new('--allow-missing-verity', '--allow-missing-verity', [CompletionResultType]::ParameterName, 'Make fs-verity validation optional in case the filesystem doesn''t support it')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;install;to-existing-root' {
            [CompletionResult]::new('--replace', '--replace', [CompletionResultType]::ParameterName, 'Configure how existing data is treated')
            [CompletionResult]::new('--source-imgref', '--source-imgref', [CompletionResultType]::ParameterName, 'Install the system from an explicitly given source')
            [CompletionResult]::new('--target-transport', '--target-transport', [CompletionResultType]::ParameterName, 'The transport; e.g. oci, oci-archive, containers-storage.  Defaults to `registry`')
            [CompletionResult]::new('--target-imgref', '--target-imgref', [CompletionResultType]::ParameterName, 'Specify the image to fetch for subsequent updates')
            [CompletionResult]::new('--karg', '--karg', [CompletionResultType]::ParameterName, 'Add a kernel argument.  This option can be provided multiple times')
            [CompletionResult]::new('--karg-delete', '--karg-delete', [CompletionResultType]::ParameterName, 'Remove a kernel argument.  This option can be provided multiple times')
            [CompletionResult]::new('--root-ssh-authorized-keys', '--root-ssh-authorized-keys', [CompletionResultType]::ParameterName, 'The path to an `authorized_keys` that will be injected into the `root` account')
            [CompletionResult]::new('--bound-images', '--bound-images', [CompletionResultType]::ParameterName, 'How should logically bound images be retrieved')
            [CompletionResult]::new('--stateroot', '--stateroot', [CompletionResultType]::ParameterName, 'The stateroot name to use. Defaults to `default`')
            [CompletionResult]::new('--bootloader', '--bootloader', [CompletionResultType]::ParameterName, 'The bootloader to use')
            [CompletionResult]::new('--uki-addon', '--uki-addon', [CompletionResultType]::ParameterName, 'Name of the UKI addons to install without the ".efi.addon" suffix. This option can be provided multiple times if multiple addons are to be installed')
            [CompletionResult]::new('--target-no-signature-verification', '--target-no-signature-verification', [CompletionResultType]::ParameterName, 'This command line argument does nothing; it exists for compatibility')
            [CompletionResult]::new('--enforce-container-sigpolicy', '--enforce-container-sigpolicy', [CompletionResultType]::ParameterName, 'This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op).  Enabling this option enforces that `/etc/containers/policy.json` includes a default policy which requires signatures')
            [CompletionResult]::new('--run-fetch-check', '--run-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--skip-fetch-check', '--skip-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--experimental-unified-storage', '--experimental-unified-storage', [CompletionResultType]::ParameterName, 'Use unified storage path to pull images (experimental)')
            [CompletionResult]::new('--disable-selinux', '--disable-selinux', [CompletionResultType]::ParameterName, 'Disable SELinux in the target (installed) system')
            [CompletionResult]::new('--generic-image', '--generic-image', [CompletionResultType]::ParameterName, 'Perform configuration changes suitable for a "generic" disk image. At the moment:')
            [CompletionResult]::new('--bootupd-skip-boot-uuid', '--bootupd-skip-boot-uuid', [CompletionResultType]::ParameterName, 'Don''t pass --write-uuid to bootupd during bootloader installation')
            [CompletionResult]::new('--acknowledge-destructive', '--acknowledge-destructive', [CompletionResultType]::ParameterName, 'Accept that this is a destructive action and skip a warning timer')
            [CompletionResult]::new('--cleanup', '--cleanup', [CompletionResultType]::ParameterName, 'Add the bootc-destructive-cleanup systemd service to delete files from the previous install on first boot')
            [CompletionResult]::new('--composefs-backend', '--composefs-backend', [CompletionResultType]::ParameterName, 'If true, composefs backend is used, else ostree backend is used')
            [CompletionResult]::new('--allow-missing-verity', '--allow-missing-verity', [CompletionResultType]::ParameterName, 'Make fs-verity validation optional in case the filesystem doesn''t support it')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;install;reset' {
            [CompletionResult]::new('--source-imgref', '--source-imgref', [CompletionResultType]::ParameterName, 'Install the system from an explicitly given source')
            [CompletionResult]::new('--target-transport', '--target-transport', [CompletionResultType]::ParameterName, 'The transport; e.g. oci, oci-archive, containers-storage.  Defaults to `registry`')
            [CompletionResult]::new('--target-imgref', '--target-imgref', [CompletionResultType]::ParameterName, 'Specify the image to fetch for subsequent updates')
            [CompletionResult]::new('--stateroot', '--stateroot', [CompletionResultType]::ParameterName, 'Name of the target stateroot. If not provided, one will be automatically generated of the form `s<year>-<serial>` where `<serial>` starts at zero and increments automatically')
            [CompletionResult]::new('--progress-fd', '--progress-fd', [CompletionResultType]::ParameterName, 'File descriptor number which must refer to an open pipe')
            [CompletionResult]::new('--karg', '--karg', [CompletionResultType]::ParameterName, 'Add a kernel argument.  This option can be provided multiple times')
            [CompletionResult]::new('--experimental', '--experimental', [CompletionResultType]::ParameterName, 'Acknowledge that this command is experimental')
            [CompletionResult]::new('--target-no-signature-verification', '--target-no-signature-verification', [CompletionResultType]::ParameterName, 'This command line argument does nothing; it exists for compatibility')
            [CompletionResult]::new('--enforce-container-sigpolicy', '--enforce-container-sigpolicy', [CompletionResultType]::ParameterName, 'This is the inverse of the previous `--target-no-signature-verification` (which is now a no-op).  Enabling this option enforces that `/etc/containers/policy.json` includes a default policy which requires signatures')
            [CompletionResult]::new('--run-fetch-check', '--run-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--skip-fetch-check', '--skip-fetch-check', [CompletionResultType]::ParameterName, 'Verify the image can be fetched from the bootc image. Updates may fail when the installation host is authenticated with the registry but the pull secret is not in the bootc image')
            [CompletionResult]::new('--experimental-unified-storage', '--experimental-unified-storage', [CompletionResultType]::ParameterName, 'Use unified storage path to pull images (experimental)')
            [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Don''t display progress')
            [CompletionResult]::new('--apply', '--apply', [CompletionResultType]::ParameterName, 'Restart or reboot into the new target image')
            [CompletionResult]::new('--no-root-kargs', '--no-root-kargs', [CompletionResultType]::ParameterName, 'Skip inheriting any automatically discovered root file system kernel arguments')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;install;finalize' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;install;ensure-completion' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;install;print-configuration' {
            [CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Print all configuration')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;install;help' {
            [CompletionResult]::new('to-disk', 'to-disk', [CompletionResultType]::ParameterValue, 'Install to the target block device')
            [CompletionResult]::new('to-filesystem', 'to-filesystem', [CompletionResultType]::ParameterValue, 'Install to an externally created filesystem structure')
            [CompletionResult]::new('to-existing-root', 'to-existing-root', [CompletionResultType]::ParameterValue, 'Install to the host root filesystem')
            [CompletionResult]::new('reset', 'reset', [CompletionResultType]::ParameterValue, 'Nondestructively create a fresh installation state inside an existing bootc system')
            [CompletionResult]::new('finalize', 'finalize', [CompletionResultType]::ParameterValue, 'Execute this as the penultimate step of an installation using `install to-filesystem`')
            [CompletionResult]::new('ensure-completion', 'ensure-completion', [CompletionResultType]::ParameterValue, 'Intended for use in environments that are performing an ostree-based installation, not bootc')
            [CompletionResult]::new('print-configuration', 'print-configuration', [CompletionResultType]::ParameterValue, 'Output JSON to stdout that contains the merged installation configuration as it may be relevant to calling processes using `install to-filesystem` that in particular want to discover the desired root filesystem type from the container image')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;install;help;to-disk' {
            break
        }
        'bootc;install;help;to-filesystem' {
            break
        }
        'bootc;install;help;to-existing-root' {
            break
        }
        'bootc;install;help;reset' {
            break
        }
        'bootc;install;help;finalize' {
            break
        }
        'bootc;install;help;ensure-completion' {
            break
        }
        'bootc;install;help;print-configuration' {
            break
        }
        'bootc;install;help;help' {
            break
        }
        'bootc;container' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('inspect', 'inspect', [CompletionResultType]::ParameterValue, 'Output information about the container image')
            [CompletionResult]::new('lint', 'lint', [CompletionResultType]::ParameterValue, 'Perform relatively inexpensive static analysis checks as part of a container build')
            [CompletionResult]::new('compute-composefs-digest', 'compute-composefs-digest', [CompletionResultType]::ParameterValue, 'Output the bootable composefs digest for a directory')
            [CompletionResult]::new('compute-composefs-digest-from-storage', 'compute-composefs-digest-from-storage', [CompletionResultType]::ParameterValue, 'Output the bootable composefs digest from container storage')
            [CompletionResult]::new('ukify', 'ukify', [CompletionResultType]::ParameterValue, 'Build a Unified Kernel Image (UKI) using ukify')
            [CompletionResult]::new('export', 'export', [CompletionResultType]::ParameterValue, 'Export container filesystem as a tar archive')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;container;inspect' {
            [CompletionResult]::new('--rootfs', '--rootfs', [CompletionResultType]::ParameterName, 'Operate on the provided rootfs')
            [CompletionResult]::new('--format', '--format', [CompletionResultType]::ParameterName, 'The output format')
            [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output in JSON format')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;container;lint' {
            [CompletionResult]::new('--rootfs', '--rootfs', [CompletionResultType]::ParameterName, 'Operate on the provided rootfs')
            [CompletionResult]::new('--skip', '--skip', [CompletionResultType]::ParameterName, 'Skip checking the targeted lints, by name. Use `--list` to discover the set of available lints')
            [CompletionResult]::new('--fatal-warnings', '--fatal-warnings', [CompletionResultType]::ParameterName, 'Make warnings fatal')
            [CompletionResult]::new('--list', '--list', [CompletionResultType]::ParameterName, 'Instead of executing the lints, just print all available lints. At the current time, this will output in YAML format because it''s reasonably human friendly. However, there is no commitment to maintaining this exact format; do not parse it via code or scripts')
            [CompletionResult]::new('--no-truncate', '--no-truncate', [CompletionResultType]::ParameterName, 'Don''t truncate the output. By default, only a limited number of entries are shown for each lint, followed by a count of remaining entries')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;container;compute-composefs-digest' {
            [CompletionResult]::new('--write-dumpfile-to', '--write-dumpfile-to', [CompletionResultType]::ParameterName, 'Additionally generate a dumpfile written to the target path')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;container;compute-composefs-digest-from-storage' {
            [CompletionResult]::new('--write-dumpfile-to', '--write-dumpfile-to', [CompletionResultType]::ParameterName, 'Additionally generate a dumpfile written to the target path')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;container;ukify' {
            [CompletionResult]::new('--rootfs', '--rootfs', [CompletionResultType]::ParameterName, 'Operate on the provided rootfs')
            [CompletionResult]::new('--karg', '--karg', [CompletionResultType]::ParameterName, 'Additional kernel arguments to append to the cmdline. Can be specified multiple times. This is a temporary workaround and will be removed')
            [CompletionResult]::new('--write-dumpfile-to', '--write-dumpfile-to', [CompletionResultType]::ParameterName, 'Write a dumpfile to this path')
            [CompletionResult]::new('--allow-missing-verity', '--allow-missing-verity', [CompletionResultType]::ParameterName, 'Make fs-verity validation optional in case the filesystem doesn''t support it')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;container;export' {
            [CompletionResult]::new('--format', '--format', [CompletionResultType]::ParameterName, 'Format for export output')
            [CompletionResult]::new('-o', '-o', [CompletionResultType]::ParameterName, 'Output file (defaults to stdout)')
            [CompletionResult]::new('--output', '--output', [CompletionResultType]::ParameterName, 'Output file (defaults to stdout)')
            [CompletionResult]::new('--kernel-in-boot', '--kernel-in-boot', [CompletionResultType]::ParameterName, 'Copy kernel and initramfs from /usr/lib/modules to /boot for legacy compatibility. This is useful for installers that expect the kernel in /boot')
            [CompletionResult]::new('--disable-selinux', '--disable-selinux', [CompletionResultType]::ParameterName, 'Disable SELinux labeling in the exported archive')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;container;help' {
            [CompletionResult]::new('inspect', 'inspect', [CompletionResultType]::ParameterValue, 'Output information about the container image')
            [CompletionResult]::new('lint', 'lint', [CompletionResultType]::ParameterValue, 'Perform relatively inexpensive static analysis checks as part of a container build')
            [CompletionResult]::new('compute-composefs-digest', 'compute-composefs-digest', [CompletionResultType]::ParameterValue, 'Output the bootable composefs digest for a directory')
            [CompletionResult]::new('compute-composefs-digest-from-storage', 'compute-composefs-digest-from-storage', [CompletionResultType]::ParameterValue, 'Output the bootable composefs digest from container storage')
            [CompletionResult]::new('ukify', 'ukify', [CompletionResultType]::ParameterValue, 'Build a Unified Kernel Image (UKI) using ukify')
            [CompletionResult]::new('export', 'export', [CompletionResultType]::ParameterValue, 'Export container filesystem as a tar archive')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;container;help;inspect' {
            break
        }
        'bootc;container;help;lint' {
            break
        }
        'bootc;container;help;compute-composefs-digest' {
            break
        }
        'bootc;container;help;compute-composefs-digest-from-storage' {
            break
        }
        'bootc;container;help;ukify' {
            break
        }
        'bootc;container;help;export' {
            break
        }
        'bootc;container;help;help' {
            break
        }
        'bootc;image' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List fetched images stored in the bootc storage')
            [CompletionResult]::new('copy-to-storage', 'copy-to-storage', [CompletionResultType]::ParameterValue, 'Copy a container image from the bootc storage to `containers-storage:`')
            [CompletionResult]::new('set-unified', 'set-unified', [CompletionResultType]::ParameterValue, 'Re-pull the currently booted image into the bootc-owned container storage')
            [CompletionResult]::new('pull-from-default-storage', 'pull-from-default-storage', [CompletionResultType]::ParameterValue, 'Copy a container image from the default `containers-storage:` to the bootc-owned container storage')
            [CompletionResult]::new('cmd', 'cmd', [CompletionResultType]::ParameterValue, 'Wrapper for selected `podman image` subcommands in bootc storage')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;image;list' {
            [CompletionResult]::new('--type', '--type', [CompletionResultType]::ParameterName, 'Type of image to list')
            [CompletionResult]::new('--format', '--format', [CompletionResultType]::ParameterName, 'format')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;image;copy-to-storage' {
            [CompletionResult]::new('--source', '--source', [CompletionResultType]::ParameterName, 'The source image; if not specified, the booted image will be used')
            [CompletionResult]::new('--target', '--target', [CompletionResultType]::ParameterName, 'The destination; if not specified, then the default is to push to `containers-storage:localhost/bootc`; this will make the image accessible via e.g. `podman run localhost/bootc` and for builds')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;image;set-unified' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;image;pull-from-default-storage' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;image;cmd' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image list` in bootc storage')
            [CompletionResult]::new('build', 'build', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image build` in bootc storage')
            [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image pull` in bootc storage')
            [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image push` in bootc storage')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;image;cmd;list' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;image;cmd;build' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;image;cmd;pull' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;image;cmd;push' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;image;cmd;help' {
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image list` in bootc storage')
            [CompletionResult]::new('build', 'build', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image build` in bootc storage')
            [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image pull` in bootc storage')
            [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image push` in bootc storage')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;image;cmd;help;list' {
            break
        }
        'bootc;image;cmd;help;build' {
            break
        }
        'bootc;image;cmd;help;pull' {
            break
        }
        'bootc;image;cmd;help;push' {
            break
        }
        'bootc;image;cmd;help;help' {
            break
        }
        'bootc;image;help' {
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List fetched images stored in the bootc storage')
            [CompletionResult]::new('copy-to-storage', 'copy-to-storage', [CompletionResultType]::ParameterValue, 'Copy a container image from the bootc storage to `containers-storage:`')
            [CompletionResult]::new('set-unified', 'set-unified', [CompletionResultType]::ParameterValue, 'Re-pull the currently booted image into the bootc-owned container storage')
            [CompletionResult]::new('pull-from-default-storage', 'pull-from-default-storage', [CompletionResultType]::ParameterValue, 'Copy a container image from the default `containers-storage:` to the bootc-owned container storage')
            [CompletionResult]::new('cmd', 'cmd', [CompletionResultType]::ParameterValue, 'Wrapper for selected `podman image` subcommands in bootc storage')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;image;help;list' {
            break
        }
        'bootc;image;help;copy-to-storage' {
            break
        }
        'bootc;image;help;set-unified' {
            break
        }
        'bootc;image;help;pull-from-default-storage' {
            break
        }
        'bootc;image;help;cmd' {
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image list` in bootc storage')
            [CompletionResult]::new('build', 'build', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image build` in bootc storage')
            [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image pull` in bootc storage')
            [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image push` in bootc storage')
            break
        }
        'bootc;image;help;cmd;list' {
            break
        }
        'bootc;image;help;cmd;build' {
            break
        }
        'bootc;image;help;cmd;pull' {
            break
        }
        'bootc;image;help;cmd;push' {
            break
        }
        'bootc;image;help;help' {
            break
        }
        'bootc;loader-entries' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('set-options-for-source', 'set-options-for-source', [CompletionResultType]::ParameterValue, 'Set or update the kernel arguments owned by a specific source')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;loader-entries;set-options-for-source' {
            [CompletionResult]::new('--source', '--source', [CompletionResultType]::ParameterName, 'The name of the source that owns these kernel arguments')
            [CompletionResult]::new('--options', '--options', [CompletionResultType]::ParameterName, 'The kernel arguments to set for this source')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;loader-entries;help' {
            [CompletionResult]::new('set-options-for-source', 'set-options-for-source', [CompletionResultType]::ParameterValue, 'Set or update the kernel arguments owned by a specific source')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;loader-entries;help;set-options-for-source' {
            break
        }
        'bootc;loader-entries;help;help' {
            break
        }
        'bootc;exec-in-host-mount-namespace' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;state' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('wipe-ostree', 'wipe-ostree', [CompletionResultType]::ParameterValue, 'Remove all ostree deployments from this system')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;state;wipe-ostree' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;state;help' {
            [CompletionResult]::new('wipe-ostree', 'wipe-ostree', [CompletionResultType]::ParameterValue, 'Remove all ostree deployments from this system')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;state;help;wipe-ostree' {
            break
        }
        'bootc;state;help;help' {
            break
        }
        'bootc;internals' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('systemd-generator', 'systemd-generator', [CompletionResultType]::ParameterValue, 'systemd-generator')
            [CompletionResult]::new('fixup-etc-fstab', 'fixup-etc-fstab', [CompletionResultType]::ParameterValue, 'fixup-etc-fstab')
            [CompletionResult]::new('print-json-schema', 'print-json-schema', [CompletionResultType]::ParameterValue, 'Should only be used by `make update-generated`')
            [CompletionResult]::new('fsverity', 'fsverity', [CompletionResultType]::ParameterValue, 'Options for consistency checking')
            [CompletionResult]::new('fsck', 'fsck', [CompletionResultType]::ParameterValue, 'Perform consistency checking')
            [CompletionResult]::new('cleanup', 'cleanup', [CompletionResultType]::ParameterValue, 'Perform cleanup actions')
            [CompletionResult]::new('relabel', 'relabel', [CompletionResultType]::ParameterValue, 'relabel')
            [CompletionResult]::new('ostree-ext', 'ostree-ext', [CompletionResultType]::ParameterValue, 'Proxy frontend for the `ostree-ext` CLI')
            [CompletionResult]::new('cfs', 'cfs', [CompletionResultType]::ParameterValue, 'Proxy frontend for the `cfsctl` CLI')
            [CompletionResult]::new('ostree-container', 'ostree-container', [CompletionResultType]::ParameterValue, 'Proxy frontend for the legacy `ostree container` CLI')
            [CompletionResult]::new('test-composefs', 'test-composefs', [CompletionResultType]::ParameterValue, 'Ensure that a composefs repository is initialized')
            [CompletionResult]::new('loopback-cleanup-helper', 'loopback-cleanup-helper', [CompletionResultType]::ParameterValue, 'Loopback device cleanup helper (internal use only)')
            [CompletionResult]::new('allocate-cleanup-loopback', 'allocate-cleanup-loopback', [CompletionResultType]::ParameterValue, 'Test loopback device allocation and cleanup (internal use only)')
            [CompletionResult]::new('bootc-install-completion', 'bootc-install-completion', [CompletionResultType]::ParameterValue, 'Invoked from ostree-ext to complete an installation')
            [CompletionResult]::new('reboot', 'reboot', [CompletionResultType]::ParameterValue, 'Initiate a reboot the same way we would after --apply; intended primarily for testing')
            [CompletionResult]::new('dir-diff', 'dir-diff', [CompletionResultType]::ParameterValue, 'Internal command for testing etc-diff/etc-merge')
            [CompletionResult]::new('prep-soft-reboot', 'prep-soft-reboot', [CompletionResultType]::ParameterValue, 'prep-soft-reboot')
            [CompletionResult]::new('composefs-gc', 'composefs-gc', [CompletionResultType]::ParameterValue, 'composefs-gc')
            [CompletionResult]::new('blockdev', 'blockdev', [CompletionResultType]::ParameterValue, 'Block device inspection tools')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;internals;systemd-generator' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;fixup-etc-fstab' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;print-json-schema' {
            [CompletionResult]::new('--of', '--of', [CompletionResultType]::ParameterName, 'of')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;fsverity' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('measure', 'measure', [CompletionResultType]::ParameterValue, 'Measure the fsverity digest of the target file')
            [CompletionResult]::new('enable', 'enable', [CompletionResultType]::ParameterValue, 'Enable fsverity on the target file')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;internals;fsverity;measure' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;fsverity;enable' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;fsverity;help' {
            [CompletionResult]::new('measure', 'measure', [CompletionResultType]::ParameterValue, 'Measure the fsverity digest of the target file')
            [CompletionResult]::new('enable', 'enable', [CompletionResultType]::ParameterValue, 'Enable fsverity on the target file')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;internals;fsverity;help;measure' {
            break
        }
        'bootc;internals;fsverity;help;enable' {
            break
        }
        'bootc;internals;fsverity;help;help' {
            break
        }
        'bootc;internals;fsck' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;cleanup' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;relabel' {
            [CompletionResult]::new('--as-path', '--as-path', [CompletionResultType]::ParameterName, 'Relabel using this path as root')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;ostree-ext' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;cfs' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;ostree-container' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;test-composefs' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;loopback-cleanup-helper' {
            [CompletionResult]::new('--device', '--device', [CompletionResultType]::ParameterName, 'Device path to clean up')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;allocate-cleanup-loopback' {
            [CompletionResult]::new('--file-path', '--file-path', [CompletionResultType]::ParameterName, 'File path to create loopback device for')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;bootc-install-completion' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;reboot' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;dir-diff' {
            [CompletionResult]::new('--merge', '--merge', [CompletionResultType]::ParameterName, 'Whether to perform the three way merge or not')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;prep-soft-reboot' {
            [CompletionResult]::new('--reboot', '--reboot', [CompletionResultType]::ParameterName, 'reboot')
            [CompletionResult]::new('--reset', '--reset', [CompletionResultType]::ParameterName, 'reset')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;composefs-gc' {
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'dry-run')
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;internals;blockdev' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for a given device path')
            [CompletionResult]::new('ls-filesystem', 'ls-filesystem', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for the device backing a filesystem')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;internals;blockdev;ls' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;internals;blockdev;ls-filesystem' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;internals;blockdev;help' {
            [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for a given device path')
            [CompletionResult]::new('ls-filesystem', 'ls-filesystem', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for the device backing a filesystem')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;internals;blockdev;help;ls' {
            break
        }
        'bootc;internals;blockdev;help;ls-filesystem' {
            break
        }
        'bootc;internals;blockdev;help;help' {
            break
        }
        'bootc;internals;help' {
            [CompletionResult]::new('systemd-generator', 'systemd-generator', [CompletionResultType]::ParameterValue, 'systemd-generator')
            [CompletionResult]::new('fixup-etc-fstab', 'fixup-etc-fstab', [CompletionResultType]::ParameterValue, 'fixup-etc-fstab')
            [CompletionResult]::new('print-json-schema', 'print-json-schema', [CompletionResultType]::ParameterValue, 'Should only be used by `make update-generated`')
            [CompletionResult]::new('fsverity', 'fsverity', [CompletionResultType]::ParameterValue, 'Options for consistency checking')
            [CompletionResult]::new('fsck', 'fsck', [CompletionResultType]::ParameterValue, 'Perform consistency checking')
            [CompletionResult]::new('cleanup', 'cleanup', [CompletionResultType]::ParameterValue, 'Perform cleanup actions')
            [CompletionResult]::new('relabel', 'relabel', [CompletionResultType]::ParameterValue, 'relabel')
            [CompletionResult]::new('ostree-ext', 'ostree-ext', [CompletionResultType]::ParameterValue, 'Proxy frontend for the `ostree-ext` CLI')
            [CompletionResult]::new('cfs', 'cfs', [CompletionResultType]::ParameterValue, 'Proxy frontend for the `cfsctl` CLI')
            [CompletionResult]::new('ostree-container', 'ostree-container', [CompletionResultType]::ParameterValue, 'Proxy frontend for the legacy `ostree container` CLI')
            [CompletionResult]::new('test-composefs', 'test-composefs', [CompletionResultType]::ParameterValue, 'Ensure that a composefs repository is initialized')
            [CompletionResult]::new('loopback-cleanup-helper', 'loopback-cleanup-helper', [CompletionResultType]::ParameterValue, 'Loopback device cleanup helper (internal use only)')
            [CompletionResult]::new('allocate-cleanup-loopback', 'allocate-cleanup-loopback', [CompletionResultType]::ParameterValue, 'Test loopback device allocation and cleanup (internal use only)')
            [CompletionResult]::new('bootc-install-completion', 'bootc-install-completion', [CompletionResultType]::ParameterValue, 'Invoked from ostree-ext to complete an installation')
            [CompletionResult]::new('reboot', 'reboot', [CompletionResultType]::ParameterValue, 'Initiate a reboot the same way we would after --apply; intended primarily for testing')
            [CompletionResult]::new('dir-diff', 'dir-diff', [CompletionResultType]::ParameterValue, 'Internal command for testing etc-diff/etc-merge')
            [CompletionResult]::new('prep-soft-reboot', 'prep-soft-reboot', [CompletionResultType]::ParameterValue, 'prep-soft-reboot')
            [CompletionResult]::new('composefs-gc', 'composefs-gc', [CompletionResultType]::ParameterValue, 'composefs-gc')
            [CompletionResult]::new('blockdev', 'blockdev', [CompletionResultType]::ParameterValue, 'Block device inspection tools')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;internals;help;systemd-generator' {
            break
        }
        'bootc;internals;help;fixup-etc-fstab' {
            break
        }
        'bootc;internals;help;print-json-schema' {
            break
        }
        'bootc;internals;help;fsverity' {
            [CompletionResult]::new('measure', 'measure', [CompletionResultType]::ParameterValue, 'Measure the fsverity digest of the target file')
            [CompletionResult]::new('enable', 'enable', [CompletionResultType]::ParameterValue, 'Enable fsverity on the target file')
            break
        }
        'bootc;internals;help;fsverity;measure' {
            break
        }
        'bootc;internals;help;fsverity;enable' {
            break
        }
        'bootc;internals;help;fsck' {
            break
        }
        'bootc;internals;help;cleanup' {
            break
        }
        'bootc;internals;help;relabel' {
            break
        }
        'bootc;internals;help;ostree-ext' {
            break
        }
        'bootc;internals;help;cfs' {
            break
        }
        'bootc;internals;help;ostree-container' {
            break
        }
        'bootc;internals;help;test-composefs' {
            break
        }
        'bootc;internals;help;loopback-cleanup-helper' {
            break
        }
        'bootc;internals;help;allocate-cleanup-loopback' {
            break
        }
        'bootc;internals;help;bootc-install-completion' {
            break
        }
        'bootc;internals;help;reboot' {
            break
        }
        'bootc;internals;help;dir-diff' {
            break
        }
        'bootc;internals;help;prep-soft-reboot' {
            break
        }
        'bootc;internals;help;composefs-gc' {
            break
        }
        'bootc;internals;help;blockdev' {
            [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for a given device path')
            [CompletionResult]::new('ls-filesystem', 'ls-filesystem', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for the device backing a filesystem')
            break
        }
        'bootc;internals;help;blockdev;ls' {
            break
        }
        'bootc;internals;help;blockdev;ls-filesystem' {
            break
        }
        'bootc;internals;help;help' {
            break
        }
        'bootc;composefs-finalize-staged' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;config-diff' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;completion' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help (see more with ''--help'')')
            break
        }
        'bootc;delete-deployment' {
            [CompletionResult]::new('-h', '-h', [CompletionResultType]::ParameterName, 'Print help')
            [CompletionResult]::new('--help', '--help', [CompletionResultType]::ParameterName, 'Print help')
            break
        }
        'bootc;help' {
            [CompletionResult]::new('upgrade', 'upgrade', [CompletionResultType]::ParameterValue, 'Download and queue an updated container image to apply')
            [CompletionResult]::new('switch', 'switch', [CompletionResultType]::ParameterValue, 'Target a new container image reference to boot')
            [CompletionResult]::new('rollback', 'rollback', [CompletionResultType]::ParameterValue, 'Change the bootloader entry ordering; the deployment under `rollback` will be queued for the next boot, and the current will become rollback.  If there is a `staged` entry (an unapplied, queued upgrade) then it will be discarded')
            [CompletionResult]::new('edit', 'edit', [CompletionResultType]::ParameterValue, 'Apply full changes to the host specification')
            [CompletionResult]::new('status', 'status', [CompletionResultType]::ParameterValue, 'Display status')
            [CompletionResult]::new('usr-overlay', 'usr-overlay', [CompletionResultType]::ParameterValue, 'Add a transient overlayfs on `/usr`')
            [CompletionResult]::new('install', 'install', [CompletionResultType]::ParameterValue, 'Install the running container to a target')
            [CompletionResult]::new('container', 'container', [CompletionResultType]::ParameterValue, 'Operations which can be executed as part of a container build')
            [CompletionResult]::new('image', 'image', [CompletionResultType]::ParameterValue, 'Operations on container images')
            [CompletionResult]::new('loader-entries', 'loader-entries', [CompletionResultType]::ParameterValue, 'Operations on Boot Loader Specification (BLS) entries')
            [CompletionResult]::new('exec-in-host-mount-namespace', 'exec-in-host-mount-namespace', [CompletionResultType]::ParameterValue, 'Execute the given command in the host mount namespace')
            [CompletionResult]::new('state', 'state', [CompletionResultType]::ParameterValue, 'Modify the state of the system')
            [CompletionResult]::new('internals', 'internals', [CompletionResultType]::ParameterValue, 'Hidden, internal only options')
            [CompletionResult]::new('composefs-finalize-staged', 'composefs-finalize-staged', [CompletionResultType]::ParameterValue, 'composefs-finalize-staged')
            [CompletionResult]::new('config-diff', 'config-diff', [CompletionResultType]::ParameterValue, 'Diff current /etc configuration versus default')
            [CompletionResult]::new('completion', 'completion', [CompletionResultType]::ParameterValue, 'Generate shell completion script for supported shells')
            [CompletionResult]::new('delete-deployment', 'delete-deployment', [CompletionResultType]::ParameterValue, 'delete-deployment')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'bootc;help;upgrade' {
            break
        }
        'bootc;help;switch' {
            break
        }
        'bootc;help;rollback' {
            break
        }
        'bootc;help;edit' {
            break
        }
        'bootc;help;status' {
            break
        }
        'bootc;help;usr-overlay' {
            break
        }
        'bootc;help;install' {
            [CompletionResult]::new('to-disk', 'to-disk', [CompletionResultType]::ParameterValue, 'Install to the target block device')
            [CompletionResult]::new('to-filesystem', 'to-filesystem', [CompletionResultType]::ParameterValue, 'Install to an externally created filesystem structure')
            [CompletionResult]::new('to-existing-root', 'to-existing-root', [CompletionResultType]::ParameterValue, 'Install to the host root filesystem')
            [CompletionResult]::new('reset', 'reset', [CompletionResultType]::ParameterValue, 'Nondestructively create a fresh installation state inside an existing bootc system')
            [CompletionResult]::new('finalize', 'finalize', [CompletionResultType]::ParameterValue, 'Execute this as the penultimate step of an installation using `install to-filesystem`')
            [CompletionResult]::new('ensure-completion', 'ensure-completion', [CompletionResultType]::ParameterValue, 'Intended for use in environments that are performing an ostree-based installation, not bootc')
            [CompletionResult]::new('print-configuration', 'print-configuration', [CompletionResultType]::ParameterValue, 'Output JSON to stdout that contains the merged installation configuration as it may be relevant to calling processes using `install to-filesystem` that in particular want to discover the desired root filesystem type from the container image')
            break
        }
        'bootc;help;install;to-disk' {
            break
        }
        'bootc;help;install;to-filesystem' {
            break
        }
        'bootc;help;install;to-existing-root' {
            break
        }
        'bootc;help;install;reset' {
            break
        }
        'bootc;help;install;finalize' {
            break
        }
        'bootc;help;install;ensure-completion' {
            break
        }
        'bootc;help;install;print-configuration' {
            break
        }
        'bootc;help;container' {
            [CompletionResult]::new('inspect', 'inspect', [CompletionResultType]::ParameterValue, 'Output information about the container image')
            [CompletionResult]::new('lint', 'lint', [CompletionResultType]::ParameterValue, 'Perform relatively inexpensive static analysis checks as part of a container build')
            [CompletionResult]::new('compute-composefs-digest', 'compute-composefs-digest', [CompletionResultType]::ParameterValue, 'Output the bootable composefs digest for a directory')
            [CompletionResult]::new('compute-composefs-digest-from-storage', 'compute-composefs-digest-from-storage', [CompletionResultType]::ParameterValue, 'Output the bootable composefs digest from container storage')
            [CompletionResult]::new('ukify', 'ukify', [CompletionResultType]::ParameterValue, 'Build a Unified Kernel Image (UKI) using ukify')
            [CompletionResult]::new('export', 'export', [CompletionResultType]::ParameterValue, 'Export container filesystem as a tar archive')
            break
        }
        'bootc;help;container;inspect' {
            break
        }
        'bootc;help;container;lint' {
            break
        }
        'bootc;help;container;compute-composefs-digest' {
            break
        }
        'bootc;help;container;compute-composefs-digest-from-storage' {
            break
        }
        'bootc;help;container;ukify' {
            break
        }
        'bootc;help;container;export' {
            break
        }
        'bootc;help;image' {
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List fetched images stored in the bootc storage')
            [CompletionResult]::new('copy-to-storage', 'copy-to-storage', [CompletionResultType]::ParameterValue, 'Copy a container image from the bootc storage to `containers-storage:`')
            [CompletionResult]::new('set-unified', 'set-unified', [CompletionResultType]::ParameterValue, 'Re-pull the currently booted image into the bootc-owned container storage')
            [CompletionResult]::new('pull-from-default-storage', 'pull-from-default-storage', [CompletionResultType]::ParameterValue, 'Copy a container image from the default `containers-storage:` to the bootc-owned container storage')
            [CompletionResult]::new('cmd', 'cmd', [CompletionResultType]::ParameterValue, 'Wrapper for selected `podman image` subcommands in bootc storage')
            break
        }
        'bootc;help;image;list' {
            break
        }
        'bootc;help;image;copy-to-storage' {
            break
        }
        'bootc;help;image;set-unified' {
            break
        }
        'bootc;help;image;pull-from-default-storage' {
            break
        }
        'bootc;help;image;cmd' {
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image list` in bootc storage')
            [CompletionResult]::new('build', 'build', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image build` in bootc storage')
            [CompletionResult]::new('pull', 'pull', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image pull` in bootc storage')
            [CompletionResult]::new('push', 'push', [CompletionResultType]::ParameterValue, 'Wrapper for `podman image push` in bootc storage')
            break
        }
        'bootc;help;image;cmd;list' {
            break
        }
        'bootc;help;image;cmd;build' {
            break
        }
        'bootc;help;image;cmd;pull' {
            break
        }
        'bootc;help;image;cmd;push' {
            break
        }
        'bootc;help;loader-entries' {
            [CompletionResult]::new('set-options-for-source', 'set-options-for-source', [CompletionResultType]::ParameterValue, 'Set or update the kernel arguments owned by a specific source')
            break
        }
        'bootc;help;loader-entries;set-options-for-source' {
            break
        }
        'bootc;help;exec-in-host-mount-namespace' {
            break
        }
        'bootc;help;state' {
            [CompletionResult]::new('wipe-ostree', 'wipe-ostree', [CompletionResultType]::ParameterValue, 'Remove all ostree deployments from this system')
            break
        }
        'bootc;help;state;wipe-ostree' {
            break
        }
        'bootc;help;internals' {
            [CompletionResult]::new('systemd-generator', 'systemd-generator', [CompletionResultType]::ParameterValue, 'systemd-generator')
            [CompletionResult]::new('fixup-etc-fstab', 'fixup-etc-fstab', [CompletionResultType]::ParameterValue, 'fixup-etc-fstab')
            [CompletionResult]::new('print-json-schema', 'print-json-schema', [CompletionResultType]::ParameterValue, 'Should only be used by `make update-generated`')
            [CompletionResult]::new('fsverity', 'fsverity', [CompletionResultType]::ParameterValue, 'Options for consistency checking')
            [CompletionResult]::new('fsck', 'fsck', [CompletionResultType]::ParameterValue, 'Perform consistency checking')
            [CompletionResult]::new('cleanup', 'cleanup', [CompletionResultType]::ParameterValue, 'Perform cleanup actions')
            [CompletionResult]::new('relabel', 'relabel', [CompletionResultType]::ParameterValue, 'relabel')
            [CompletionResult]::new('ostree-ext', 'ostree-ext', [CompletionResultType]::ParameterValue, 'Proxy frontend for the `ostree-ext` CLI')
            [CompletionResult]::new('cfs', 'cfs', [CompletionResultType]::ParameterValue, 'Proxy frontend for the `cfsctl` CLI')
            [CompletionResult]::new('ostree-container', 'ostree-container', [CompletionResultType]::ParameterValue, 'Proxy frontend for the legacy `ostree container` CLI')
            [CompletionResult]::new('test-composefs', 'test-composefs', [CompletionResultType]::ParameterValue, 'Ensure that a composefs repository is initialized')
            [CompletionResult]::new('loopback-cleanup-helper', 'loopback-cleanup-helper', [CompletionResultType]::ParameterValue, 'Loopback device cleanup helper (internal use only)')
            [CompletionResult]::new('allocate-cleanup-loopback', 'allocate-cleanup-loopback', [CompletionResultType]::ParameterValue, 'Test loopback device allocation and cleanup (internal use only)')
            [CompletionResult]::new('bootc-install-completion', 'bootc-install-completion', [CompletionResultType]::ParameterValue, 'Invoked from ostree-ext to complete an installation')
            [CompletionResult]::new('reboot', 'reboot', [CompletionResultType]::ParameterValue, 'Initiate a reboot the same way we would after --apply; intended primarily for testing')
            [CompletionResult]::new('dir-diff', 'dir-diff', [CompletionResultType]::ParameterValue, 'Internal command for testing etc-diff/etc-merge')
            [CompletionResult]::new('prep-soft-reboot', 'prep-soft-reboot', [CompletionResultType]::ParameterValue, 'prep-soft-reboot')
            [CompletionResult]::new('composefs-gc', 'composefs-gc', [CompletionResultType]::ParameterValue, 'composefs-gc')
            [CompletionResult]::new('blockdev', 'blockdev', [CompletionResultType]::ParameterValue, 'Block device inspection tools')
            break
        }
        'bootc;help;internals;systemd-generator' {
            break
        }
        'bootc;help;internals;fixup-etc-fstab' {
            break
        }
        'bootc;help;internals;print-json-schema' {
            break
        }
        'bootc;help;internals;fsverity' {
            [CompletionResult]::new('measure', 'measure', [CompletionResultType]::ParameterValue, 'Measure the fsverity digest of the target file')
            [CompletionResult]::new('enable', 'enable', [CompletionResultType]::ParameterValue, 'Enable fsverity on the target file')
            break
        }
        'bootc;help;internals;fsverity;measure' {
            break
        }
        'bootc;help;internals;fsverity;enable' {
            break
        }
        'bootc;help;internals;fsck' {
            break
        }
        'bootc;help;internals;cleanup' {
            break
        }
        'bootc;help;internals;relabel' {
            break
        }
        'bootc;help;internals;ostree-ext' {
            break
        }
        'bootc;help;internals;cfs' {
            break
        }
        'bootc;help;internals;ostree-container' {
            break
        }
        'bootc;help;internals;test-composefs' {
            break
        }
        'bootc;help;internals;loopback-cleanup-helper' {
            break
        }
        'bootc;help;internals;allocate-cleanup-loopback' {
            break
        }
        'bootc;help;internals;bootc-install-completion' {
            break
        }
        'bootc;help;internals;reboot' {
            break
        }
        'bootc;help;internals;dir-diff' {
            break
        }
        'bootc;help;internals;prep-soft-reboot' {
            break
        }
        'bootc;help;internals;composefs-gc' {
            break
        }
        'bootc;help;internals;blockdev' {
            [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for a given device path')
            [CompletionResult]::new('ls-filesystem', 'ls-filesystem', [CompletionResultType]::ParameterValue, 'List block device information (as JSON) for the device backing a filesystem')
            break
        }
        'bootc;help;internals;blockdev;ls' {
            break
        }
        'bootc;help;internals;blockdev;ls-filesystem' {
            break
        }
        'bootc;help;composefs-finalize-staged' {
            break
        }
        'bootc;help;config-diff' {
            break
        }
        'bootc;help;completion' {
            break
        }
        'bootc;help;delete-deployment' {
            break
        }
        'bootc;help;help' {
            break
        }
    })

    $completions.Where{ $_.CompletionText -like "$wordToComplete*" } |
        Sort-Object -Property ListItemText
}
