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

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

    $commandElements = $commandAst.CommandElements
    $command = @(
        'rustic'
        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) {
        'rustic' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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('backup', 'backup', [CompletionResultType]::ParameterValue, 'Backup to the repository')
            [CompletionResult]::new('cat', 'cat', [CompletionResultType]::ParameterValue, 'Show raw data of repository files and blobs')
            [CompletionResult]::new('config', 'config', [CompletionResultType]::ParameterValue, 'Change the repository configuration')
            [CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Generate shell completions')
            [CompletionResult]::new('check', 'check', [CompletionResultType]::ParameterValue, 'Check the repository')
            [CompletionResult]::new('copy', 'copy', [CompletionResultType]::ParameterValue, 'Copy snapshots to other repositories. Note: The target repositories must be given in the config file!')
            [CompletionResult]::new('diff', 'diff', [CompletionResultType]::ParameterValue, 'Compare two snapshots/paths Note that the exclude options only apply for comparison with a local path')
            [CompletionResult]::new('dump', 'dump', [CompletionResultType]::ParameterValue, 'dump the contents of a file in a snapshot to stdout')
            [CompletionResult]::new('find', 'find', [CompletionResultType]::ParameterValue, 'Find in given snapshots')
            [CompletionResult]::new('forget', 'forget', [CompletionResultType]::ParameterValue, 'Remove snapshots from the repository')
            [CompletionResult]::new('init', 'init', [CompletionResultType]::ParameterValue, 'Initialize a new repository')
            [CompletionResult]::new('key', 'key', [CompletionResultType]::ParameterValue, 'Manage keys')
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List repository files')
            [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List file contents of a snapshot')
            [CompletionResult]::new('merge', 'merge', [CompletionResultType]::ParameterValue, 'Merge snapshots')
            [CompletionResult]::new('snapshots', 'snapshots', [CompletionResultType]::ParameterValue, 'Show a detailed overview of the snapshots within the repository')
            [CompletionResult]::new('show-config', 'show-config', [CompletionResultType]::ParameterValue, 'Show the configuration which has been read from the config file(s)')
            [CompletionResult]::new('self-update', 'self-update', [CompletionResultType]::ParameterValue, 'Update to the latest rustic release')
            [CompletionResult]::new('prune', 'prune', [CompletionResultType]::ParameterValue, 'Remove unused data or repack repository pack files')
            [CompletionResult]::new('restore', 'restore', [CompletionResultType]::ParameterValue, 'Restore a snapshot/path')
            [CompletionResult]::new('repair', 'repair', [CompletionResultType]::ParameterValue, 'Repair a snapshot/path')
            [CompletionResult]::new('repoinfo', 'repoinfo', [CompletionResultType]::ParameterValue, 'Show general information about the repository')
            [CompletionResult]::new('tag', 'tag', [CompletionResultType]::ParameterValue, 'Change tags of snapshots')
            [CompletionResult]::new('webdav', 'webdav', [CompletionResultType]::ParameterValue, 'Start a webdav server which allows to access the repository')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;backup' {
            [CompletionResult]::new('--stdin-filename', '--stdin-filename', [CompletionResultType]::ParameterName, 'Set filename to be used when backing up from stdin')
            [CompletionResult]::new('--as-path', '--as-path', [CompletionResultType]::ParameterName, 'Manually set backup path in snapshot')
            [CompletionResult]::new('-g', '-g', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags to find a suitable parent (default: host,label,paths)')
            [CompletionResult]::new('--group-by', '--group-by', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags to find a suitable parent (default: host,label,paths)')
            [CompletionResult]::new('--parent', '--parent', [CompletionResultType]::ParameterName, 'Snapshot to use as parent')
            [CompletionResult]::new('--glob', '--glob', [CompletionResultType]::ParameterName, 'Glob pattern to exclude/include (can be specified multiple times)')
            [CompletionResult]::new('--iglob', '--iglob', [CompletionResultType]::ParameterName, 'Same as --glob pattern but ignores the casing of filenames')
            [CompletionResult]::new('--glob-file', '--glob-file', [CompletionResultType]::ParameterName, 'Read glob patterns to exclude/include from this file (can be specified multiple times)')
            [CompletionResult]::new('--iglob-file', '--iglob-file', [CompletionResultType]::ParameterName, 'Same as --glob-file ignores the casing of filenames in patterns')
            [CompletionResult]::new('--custom-ignorefile', '--custom-ignorefile', [CompletionResultType]::ParameterName, 'Treat the provided filename like a .gitignore file (can be specified multiple times)')
            [CompletionResult]::new('--exclude-if-present', '--exclude-if-present', [CompletionResultType]::ParameterName, 'Exclude contents of directories containing this filename (can be specified multiple times)')
            [CompletionResult]::new('--exclude-larger-than', '--exclude-larger-than', [CompletionResultType]::ParameterName, 'Maximum size of files to be backed up. Larger files will be excluded')
            [CompletionResult]::new('--label', '--label', [CompletionResultType]::ParameterName, 'Label snapshot with given label')
            [CompletionResult]::new('--tag', '--tag', [CompletionResultType]::ParameterName, 'Tags to add to snapshot (can be specified multiple times)')
            [CompletionResult]::new('--description', '--description', [CompletionResultType]::ParameterName, 'Add description to snapshot')
            [CompletionResult]::new('--description-from', '--description-from', [CompletionResultType]::ParameterName, 'Add description to snapshot from file')
            [CompletionResult]::new('--time', '--time', [CompletionResultType]::ParameterName, 'Set the backup time manually')
            [CompletionResult]::new('--delete-after', '--delete-after', [CompletionResultType]::ParameterName, 'Mark snapshot to be deleted after given duration (e.g. 10d)')
            [CompletionResult]::new('--host', '--host', [CompletionResultType]::ParameterName, 'Set the host name manually')
            [CompletionResult]::new('--command', '--command', [CompletionResultType]::ParameterName, 'Set the backup command manually')
            [CompletionResult]::new('--hostname', '--hostname', [CompletionResultType]::ParameterName, 'Set ''hostname'' in public key information')
            [CompletionResult]::new('--username', '--username', [CompletionResultType]::ParameterName, 'Set ''username'' in public key information')
            [CompletionResult]::new('--set-compression', '--set-compression', [CompletionResultType]::ParameterName, 'Set compression level. Allowed levels are 1 to 22 and -1 to -7, see <https://facebook.github.io/zstd/>. Note that 0 equals to no compression')
            [CompletionResult]::new('--set-version', '--set-version', [CompletionResultType]::ParameterName, 'Set repository version. Allowed versions: 1,2')
            [CompletionResult]::new('--set-append-only', '--set-append-only', [CompletionResultType]::ParameterName, 'Set append-only mode. Note that only append-only commands work once this is set. `forget`, `prune` or `config` won''t work any longer')
            [CompletionResult]::new('--set-treepack-size', '--set-treepack-size', [CompletionResultType]::ParameterName, 'Set default packsize for tree packs. rustic tries to always produce packs greater than this value. Note that for large repos, this value is grown by the grown factor. Defaults to `4 MiB` if not set')
            [CompletionResult]::new('--set-treepack-size-limit', '--set-treepack-size-limit', [CompletionResultType]::ParameterName, 'Set upper limit for default packsize for tree packs. Note that packs actually can get a bit larger. If not set, pack sizes can grow up to approximately `4 GiB`')
            [CompletionResult]::new('--set-treepack-growfactor', '--set-treepack-growfactor', [CompletionResultType]::ParameterName, 'Set grow factor for tree packs. The default packsize grows by the square root of the total size of all tree packs multiplied with this factor. This means 32 kiB times this factor per square root of total treesize in GiB. Defaults to `32` (= 1MB per square root of total treesize in GiB) if not set')
            [CompletionResult]::new('--set-datapack-size', '--set-datapack-size', [CompletionResultType]::ParameterName, 'Set default packsize for data packs. rustic tries to always produce packs greater than this value. Note that for large repos, this value is grown by the grown factor. Defaults to `32 MiB` if not set')
            [CompletionResult]::new('--set-datapack-growfactor', '--set-datapack-growfactor', [CompletionResultType]::ParameterName, 'Set grow factor for data packs. The default packsize grows by the square root of the total size of all data packs multiplied with this factor. This means 32 kiB times this factor per square root of total datasize in GiB. Defaults to `32` (= 1MB per square root of total datasize in GiB) if not set')
            [CompletionResult]::new('--set-datapack-size-limit', '--set-datapack-size-limit', [CompletionResultType]::ParameterName, 'Set upper limit for default packsize for tree packs. Note that packs actually can get a bit larger. If not set, pack sizes can grow up to approximately `4 GiB`')
            [CompletionResult]::new('--set-min-packsize-tolerate-percent', '--set-min-packsize-tolerate-percent', [CompletionResultType]::ParameterName, 'Set minimum tolerated packsize in percent of the targeted packsize. Defaults to `30` if not set')
            [CompletionResult]::new('--set-max-packsize-tolerate-percent', '--set-max-packsize-tolerate-percent', [CompletionResultType]::ParameterName, 'Set maximum tolerated packsize in percent of the targeted packsize A value of `0` means packs larger than the targeted packsize are always tolerated. Default if not set: larger packfiles are always tolerated')
            [CompletionResult]::new('--set-extra-verify', '--set-extra-verify', [CompletionResultType]::ParameterName, 'Do an extra verification by decompressing/decrypting all data before uploading to the repository. Default: true')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--with-atime', '--with-atime', [CompletionResultType]::ParameterName, 'Save access time for files and directories')
            [CompletionResult]::new('--ignore-devid', '--ignore-devid', [CompletionResultType]::ParameterName, 'Don''t save device ID for files and directories')
            [CompletionResult]::new('--no-scan', '--no-scan', [CompletionResultType]::ParameterName, 'Don''t scan the backup source for its size - this disables ETA estimation for backup')
            [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output generated snapshot in json format')
            [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Don''t show any output')
            [CompletionResult]::new('--init', '--init', [CompletionResultType]::ParameterName, 'Initialize repository, if it doesn''t exist yet')
            [CompletionResult]::new('--skip-identical-parent', '--skip-identical-parent', [CompletionResultType]::ParameterName, 'Skip writing of snapshot if nothing changed w.r.t. the parent snapshot')
            [CompletionResult]::new('-f', '-f', [CompletionResultType]::ParameterName, 'Use no parent, read all files')
            [CompletionResult]::new('--force', '--force', [CompletionResultType]::ParameterName, 'Use no parent, read all files')
            [CompletionResult]::new('--ignore-ctime', '--ignore-ctime', [CompletionResultType]::ParameterName, 'Ignore ctime changes when checking for modified files')
            [CompletionResult]::new('--ignore-inode', '--ignore-inode', [CompletionResultType]::ParameterName, 'Ignore inode number changes when checking for modified files')
            [CompletionResult]::new('--git-ignore', '--git-ignore', [CompletionResultType]::ParameterName, 'Ignore files based on .gitignore files')
            [CompletionResult]::new('--no-require-git', '--no-require-git', [CompletionResultType]::ParameterName, 'Do not require a git repository to apply git-ignore rule')
            [CompletionResult]::new('-x', '-x', [CompletionResultType]::ParameterName, 'Exclude other file systems, don''t cross filesystem boundaries and subvolumes')
            [CompletionResult]::new('--one-file-system', '--one-file-system', [CompletionResultType]::ParameterName, 'Exclude other file systems, don''t cross filesystem boundaries and subvolumes')
            [CompletionResult]::new('--delete-never', '--delete-never', [CompletionResultType]::ParameterName, 'Mark snapshot as uneraseable')
            [CompletionResult]::new('--with-created', '--with-created', [CompletionResultType]::ParameterName, 'Add ''created'' date in public key information')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;cat' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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('tree-blob', 'tree-blob', [CompletionResultType]::ParameterValue, 'Display a tree blob')
            [CompletionResult]::new('data-blob', 'data-blob', [CompletionResultType]::ParameterValue, 'Display a data blob')
            [CompletionResult]::new('config', 'config', [CompletionResultType]::ParameterValue, 'Display the config file')
            [CompletionResult]::new('index', 'index', [CompletionResultType]::ParameterValue, 'Display an index file')
            [CompletionResult]::new('snapshot', 'snapshot', [CompletionResultType]::ParameterValue, 'Display a snapshot file')
            [CompletionResult]::new('tree', 'tree', [CompletionResultType]::ParameterValue, 'Display a tree within a snapshot')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;cat;tree-blob' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;cat;data-blob' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;cat;config' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;cat;index' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;cat;snapshot' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;cat;tree' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;cat;help' {
            [CompletionResult]::new('tree-blob', 'tree-blob', [CompletionResultType]::ParameterValue, 'Display a tree blob')
            [CompletionResult]::new('data-blob', 'data-blob', [CompletionResultType]::ParameterValue, 'Display a data blob')
            [CompletionResult]::new('config', 'config', [CompletionResultType]::ParameterValue, 'Display the config file')
            [CompletionResult]::new('index', 'index', [CompletionResultType]::ParameterValue, 'Display an index file')
            [CompletionResult]::new('snapshot', 'snapshot', [CompletionResultType]::ParameterValue, 'Display a snapshot file')
            [CompletionResult]::new('tree', 'tree', [CompletionResultType]::ParameterValue, 'Display a tree within a snapshot')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;cat;help;tree-blob' {
            break
        }
        'rustic;cat;help;data-blob' {
            break
        }
        'rustic;cat;help;config' {
            break
        }
        'rustic;cat;help;index' {
            break
        }
        'rustic;cat;help;snapshot' {
            break
        }
        'rustic;cat;help;tree' {
            break
        }
        'rustic;cat;help;help' {
            break
        }
        'rustic;config' {
            [CompletionResult]::new('--set-compression', '--set-compression', [CompletionResultType]::ParameterName, 'Set compression level. Allowed levels are 1 to 22 and -1 to -7, see <https://facebook.github.io/zstd/>. Note that 0 equals to no compression')
            [CompletionResult]::new('--set-version', '--set-version', [CompletionResultType]::ParameterName, 'Set repository version. Allowed versions: 1,2')
            [CompletionResult]::new('--set-append-only', '--set-append-only', [CompletionResultType]::ParameterName, 'Set append-only mode. Note that only append-only commands work once this is set. `forget`, `prune` or `config` won''t work any longer')
            [CompletionResult]::new('--set-treepack-size', '--set-treepack-size', [CompletionResultType]::ParameterName, 'Set default packsize for tree packs. rustic tries to always produce packs greater than this value. Note that for large repos, this value is grown by the grown factor. Defaults to `4 MiB` if not set')
            [CompletionResult]::new('--set-treepack-size-limit', '--set-treepack-size-limit', [CompletionResultType]::ParameterName, 'Set upper limit for default packsize for tree packs. Note that packs actually can get a bit larger. If not set, pack sizes can grow up to approximately `4 GiB`')
            [CompletionResult]::new('--set-treepack-growfactor', '--set-treepack-growfactor', [CompletionResultType]::ParameterName, 'Set grow factor for tree packs. The default packsize grows by the square root of the total size of all tree packs multiplied with this factor. This means 32 kiB times this factor per square root of total treesize in GiB. Defaults to `32` (= 1MB per square root of total treesize in GiB) if not set')
            [CompletionResult]::new('--set-datapack-size', '--set-datapack-size', [CompletionResultType]::ParameterName, 'Set default packsize for data packs. rustic tries to always produce packs greater than this value. Note that for large repos, this value is grown by the grown factor. Defaults to `32 MiB` if not set')
            [CompletionResult]::new('--set-datapack-growfactor', '--set-datapack-growfactor', [CompletionResultType]::ParameterName, 'Set grow factor for data packs. The default packsize grows by the square root of the total size of all data packs multiplied with this factor. This means 32 kiB times this factor per square root of total datasize in GiB. Defaults to `32` (= 1MB per square root of total datasize in GiB) if not set')
            [CompletionResult]::new('--set-datapack-size-limit', '--set-datapack-size-limit', [CompletionResultType]::ParameterName, 'Set upper limit for default packsize for tree packs. Note that packs actually can get a bit larger. If not set, pack sizes can grow up to approximately `4 GiB`')
            [CompletionResult]::new('--set-min-packsize-tolerate-percent', '--set-min-packsize-tolerate-percent', [CompletionResultType]::ParameterName, 'Set minimum tolerated packsize in percent of the targeted packsize. Defaults to `30` if not set')
            [CompletionResult]::new('--set-max-packsize-tolerate-percent', '--set-max-packsize-tolerate-percent', [CompletionResultType]::ParameterName, 'Set maximum tolerated packsize in percent of the targeted packsize A value of `0` means packs larger than the targeted packsize are always tolerated. Default if not set: larger packfiles are always tolerated')
            [CompletionResult]::new('--set-extra-verify', '--set-extra-verify', [CompletionResultType]::ParameterName, 'Do an extra verification by decompressing/decrypting all data before uploading to the repository. Default: true')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;completions' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;check' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--trust-cache', '--trust-cache', [CompletionResultType]::ParameterName, 'Don''t verify the data saved in the cache')
            [CompletionResult]::new('--read-data', '--read-data', [CompletionResultType]::ParameterName, 'Read all data blobs')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;copy' {
            [CompletionResult]::new('--hostname', '--hostname', [CompletionResultType]::ParameterName, 'Set ''hostname'' in public key information')
            [CompletionResult]::new('--username', '--username', [CompletionResultType]::ParameterName, 'Set ''username'' in public key information')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--init', '--init', [CompletionResultType]::ParameterName, 'Initialize non-existing target repositories')
            [CompletionResult]::new('--with-created', '--with-created', [CompletionResultType]::ParameterName, 'Add ''created'' date in public key information')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;diff' {
            [CompletionResult]::new('--glob', '--glob', [CompletionResultType]::ParameterName, 'Glob pattern to exclude/include (can be specified multiple times)')
            [CompletionResult]::new('--iglob', '--iglob', [CompletionResultType]::ParameterName, 'Same as --glob pattern but ignores the casing of filenames')
            [CompletionResult]::new('--glob-file', '--glob-file', [CompletionResultType]::ParameterName, 'Read glob patterns to exclude/include from this file (can be specified multiple times)')
            [CompletionResult]::new('--iglob-file', '--iglob-file', [CompletionResultType]::ParameterName, 'Same as --glob-file ignores the casing of filenames in patterns')
            [CompletionResult]::new('--custom-ignorefile', '--custom-ignorefile', [CompletionResultType]::ParameterName, 'Treat the provided filename like a .gitignore file (can be specified multiple times)')
            [CompletionResult]::new('--exclude-if-present', '--exclude-if-present', [CompletionResultType]::ParameterName, 'Exclude contents of directories containing this filename (can be specified multiple times)')
            [CompletionResult]::new('--exclude-larger-than', '--exclude-larger-than', [CompletionResultType]::ParameterName, 'Maximum size of files to be backed up. Larger files will be excluded')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--metadata', '--metadata', [CompletionResultType]::ParameterName, 'show differences in metadata')
            [CompletionResult]::new('--no-content', '--no-content', [CompletionResultType]::ParameterName, 'don''t check for different file contents')
            [CompletionResult]::new('--git-ignore', '--git-ignore', [CompletionResultType]::ParameterName, 'Ignore files based on .gitignore files')
            [CompletionResult]::new('--no-require-git', '--no-require-git', [CompletionResultType]::ParameterName, 'Do not require a git repository to apply git-ignore rule')
            [CompletionResult]::new('-x', '-x', [CompletionResultType]::ParameterName, 'Exclude other file systems, don''t cross filesystem boundaries and subvolumes')
            [CompletionResult]::new('--one-file-system', '--one-file-system', [CompletionResultType]::ParameterName, 'Exclude other file systems, don''t cross filesystem boundaries and subvolumes')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;dump' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;find' {
            [CompletionResult]::new('--glob', '--glob', [CompletionResultType]::ParameterName, 'pattern to find (can be specified multiple times)')
            [CompletionResult]::new('--iglob', '--iglob', [CompletionResultType]::ParameterName, 'pattern to find case-insensitive (can be specified multiple times)')
            [CompletionResult]::new('--path', '--path', [CompletionResultType]::ParameterName, 'exact path to find')
            [CompletionResult]::new('-g', '-g', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags')
            [CompletionResult]::new('--group-by', '--group-by', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show all snapshots instead of summarizing snapshots with identical search results')
            [CompletionResult]::new('--show-misses', '--show-misses', [CompletionResultType]::ParameterName, 'Also show snapshots which don''t contain a search result')
            [CompletionResult]::new('--numeric-uid-gid', '--numeric-uid-gid', [CompletionResultType]::ParameterName, 'Show uid/gid instead of user/group')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;forget' {
            [CompletionResult]::new('-g', '-g', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags (default: "host,label,paths")')
            [CompletionResult]::new('--group-by', '--group-by', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags (default: "host,label,paths")')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--keep-tags', '--keep-tags', [CompletionResultType]::ParameterName, 'Keep snapshots with this taglist (can be specified multiple times)')
            [CompletionResult]::new('--keep-id', '--keep-id', [CompletionResultType]::ParameterName, 'Keep snapshots ids that start with ID (can be specified multiple times)')
            [CompletionResult]::new('-l', '-l', [CompletionResultType]::ParameterName, 'Keep the last N snapshots (N == -1: keep all snapshots)')
            [CompletionResult]::new('--keep-last', '--keep-last', [CompletionResultType]::ParameterName, 'Keep the last N snapshots (N == -1: keep all snapshots)')
            [CompletionResult]::new('-H', '-H ', [CompletionResultType]::ParameterName, 'Keep the last N hourly snapshots (N == -1: keep all hourly snapshots)')
            [CompletionResult]::new('--keep-hourly', '--keep-hourly', [CompletionResultType]::ParameterName, 'Keep the last N hourly snapshots (N == -1: keep all hourly snapshots)')
            [CompletionResult]::new('-d', '-d', [CompletionResultType]::ParameterName, 'Keep the last N daily snapshots (N == -1: keep all daily snapshots)')
            [CompletionResult]::new('--keep-daily', '--keep-daily', [CompletionResultType]::ParameterName, 'Keep the last N daily snapshots (N == -1: keep all daily snapshots)')
            [CompletionResult]::new('-w', '-w', [CompletionResultType]::ParameterName, 'Keep the last N weekly snapshots (N == -1: keep all weekly snapshots)')
            [CompletionResult]::new('--keep-weekly', '--keep-weekly', [CompletionResultType]::ParameterName, 'Keep the last N weekly snapshots (N == -1: keep all weekly snapshots)')
            [CompletionResult]::new('-m', '-m', [CompletionResultType]::ParameterName, 'Keep the last N monthly snapshots (N == -1: keep all monthly snapshots)')
            [CompletionResult]::new('--keep-monthly', '--keep-monthly', [CompletionResultType]::ParameterName, 'Keep the last N monthly snapshots (N == -1: keep all monthly snapshots)')
            [CompletionResult]::new('--keep-quarter-yearly', '--keep-quarter-yearly', [CompletionResultType]::ParameterName, 'Keep the last N quarter-yearly snapshots (N == -1: keep all quarter-yearly snapshots)')
            [CompletionResult]::new('--keep-half-yearly', '--keep-half-yearly', [CompletionResultType]::ParameterName, 'Keep the last N half-yearly snapshots (N == -1: keep all half-yearly snapshots)')
            [CompletionResult]::new('-y', '-y', [CompletionResultType]::ParameterName, 'Keep the last N yearly snapshots (N == -1: keep all yearly snapshots)')
            [CompletionResult]::new('--keep-yearly', '--keep-yearly', [CompletionResultType]::ParameterName, 'Keep the last N yearly snapshots (N == -1: keep all yearly snapshots)')
            [CompletionResult]::new('--keep-within', '--keep-within', [CompletionResultType]::ParameterName, 'Keep snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--keep-within-hourly', '--keep-within-hourly', [CompletionResultType]::ParameterName, 'Keep hourly snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--keep-within-daily', '--keep-within-daily', [CompletionResultType]::ParameterName, 'Keep daily snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--keep-within-weekly', '--keep-within-weekly', [CompletionResultType]::ParameterName, 'Keep weekly snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--keep-within-monthly', '--keep-within-monthly', [CompletionResultType]::ParameterName, 'Keep monthly snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--keep-within-quarter-yearly', '--keep-within-quarter-yearly', [CompletionResultType]::ParameterName, 'Keep quarter-yearly snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--keep-within-half-yearly', '--keep-within-half-yearly', [CompletionResultType]::ParameterName, 'Keep half-yearly snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--keep-within-yearly', '--keep-within-yearly', [CompletionResultType]::ParameterName, 'Keep yearly snapshots newer than DURATION relative to latest snapshot')
            [CompletionResult]::new('--max-repack', '--max-repack', [CompletionResultType]::ParameterName, 'Define maximum data to repack in % of reposize or as size (e.g. ''5b'', ''2 kB'', ''3M'', ''4TiB'') or ''unlimited''')
            [CompletionResult]::new('--max-unused', '--max-unused', [CompletionResultType]::ParameterName, 'Tolerate limit of unused data in % of reposize after pruning or as size (e.g. ''5b'', ''2 kB'', ''3M'', ''4TiB'') or ''unlimited''')
            [CompletionResult]::new('--keep-pack', '--keep-pack', [CompletionResultType]::ParameterName, 'Minimum duration (e.g. 90d) to keep packs before repacking or removing. More recently created packs won''t be repacked or marked for deletion within this prune run')
            [CompletionResult]::new('--keep-delete', '--keep-delete', [CompletionResultType]::ParameterName, 'Minimum duration (e.g. 10m) to keep packs marked for deletion. More recently marked packs won''t be deleted within this prune run')
            [CompletionResult]::new('--repack-cacheable-only', '--repack-cacheable-only', [CompletionResultType]::ParameterName, 'Only repack packs which are cacheable [default: true for a hot/cold repository, else false]')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Show infos in json format')
            [CompletionResult]::new('--quiet', '--quiet', [CompletionResultType]::ParameterName, 'Don''t show any output')
            [CompletionResult]::new('--prune', '--prune', [CompletionResultType]::ParameterName, 'Also prune the repository')
            [CompletionResult]::new('--keep-none', '--keep-none', [CompletionResultType]::ParameterName, 'Allow to keep no snapshot')
            [CompletionResult]::new('--instant-delete', '--instant-delete', [CompletionResultType]::ParameterName, 'Delete files immediately instead of marking them. This also removes all files already marked for deletion')
            [CompletionResult]::new('--early-delete-index', '--early-delete-index', [CompletionResultType]::ParameterName, 'Delete index files early. This allows to run prune if there is few or no space left')
            [CompletionResult]::new('--fast-repack', '--fast-repack', [CompletionResultType]::ParameterName, 'Simply copy blobs when repacking instead of decrypting; possibly compressing; encrypting')
            [CompletionResult]::new('--repack-uncompressed', '--repack-uncompressed', [CompletionResultType]::ParameterName, 'Repack packs containing uncompressed blobs. This cannot be used with --fast-repack. Implies --max-unused=0')
            [CompletionResult]::new('--repack-all', '--repack-all', [CompletionResultType]::ParameterName, 'Repack all packs. Implies --max-unused=0')
            [CompletionResult]::new('--no-resize', '--no-resize', [CompletionResultType]::ParameterName, 'Do not repack packs which only needs to be resized')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;init' {
            [CompletionResult]::new('--hostname', '--hostname', [CompletionResultType]::ParameterName, 'Set ''hostname'' in public key information')
            [CompletionResult]::new('--username', '--username', [CompletionResultType]::ParameterName, 'Set ''username'' in public key information')
            [CompletionResult]::new('--set-compression', '--set-compression', [CompletionResultType]::ParameterName, 'Set compression level. Allowed levels are 1 to 22 and -1 to -7, see <https://facebook.github.io/zstd/>. Note that 0 equals to no compression')
            [CompletionResult]::new('--set-version', '--set-version', [CompletionResultType]::ParameterName, 'Set repository version. Allowed versions: 1,2')
            [CompletionResult]::new('--set-append-only', '--set-append-only', [CompletionResultType]::ParameterName, 'Set append-only mode. Note that only append-only commands work once this is set. `forget`, `prune` or `config` won''t work any longer')
            [CompletionResult]::new('--set-treepack-size', '--set-treepack-size', [CompletionResultType]::ParameterName, 'Set default packsize for tree packs. rustic tries to always produce packs greater than this value. Note that for large repos, this value is grown by the grown factor. Defaults to `4 MiB` if not set')
            [CompletionResult]::new('--set-treepack-size-limit', '--set-treepack-size-limit', [CompletionResultType]::ParameterName, 'Set upper limit for default packsize for tree packs. Note that packs actually can get a bit larger. If not set, pack sizes can grow up to approximately `4 GiB`')
            [CompletionResult]::new('--set-treepack-growfactor', '--set-treepack-growfactor', [CompletionResultType]::ParameterName, 'Set grow factor for tree packs. The default packsize grows by the square root of the total size of all tree packs multiplied with this factor. This means 32 kiB times this factor per square root of total treesize in GiB. Defaults to `32` (= 1MB per square root of total treesize in GiB) if not set')
            [CompletionResult]::new('--set-datapack-size', '--set-datapack-size', [CompletionResultType]::ParameterName, 'Set default packsize for data packs. rustic tries to always produce packs greater than this value. Note that for large repos, this value is grown by the grown factor. Defaults to `32 MiB` if not set')
            [CompletionResult]::new('--set-datapack-growfactor', '--set-datapack-growfactor', [CompletionResultType]::ParameterName, 'Set grow factor for data packs. The default packsize grows by the square root of the total size of all data packs multiplied with this factor. This means 32 kiB times this factor per square root of total datasize in GiB. Defaults to `32` (= 1MB per square root of total datasize in GiB) if not set')
            [CompletionResult]::new('--set-datapack-size-limit', '--set-datapack-size-limit', [CompletionResultType]::ParameterName, 'Set upper limit for default packsize for tree packs. Note that packs actually can get a bit larger. If not set, pack sizes can grow up to approximately `4 GiB`')
            [CompletionResult]::new('--set-min-packsize-tolerate-percent', '--set-min-packsize-tolerate-percent', [CompletionResultType]::ParameterName, 'Set minimum tolerated packsize in percent of the targeted packsize. Defaults to `30` if not set')
            [CompletionResult]::new('--set-max-packsize-tolerate-percent', '--set-max-packsize-tolerate-percent', [CompletionResultType]::ParameterName, 'Set maximum tolerated packsize in percent of the targeted packsize A value of `0` means packs larger than the targeted packsize are always tolerated. Default if not set: larger packfiles are always tolerated')
            [CompletionResult]::new('--set-extra-verify', '--set-extra-verify', [CompletionResultType]::ParameterName, 'Do an extra verification by decompressing/decrypting all data before uploading to the repository. Default: true')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--with-created', '--with-created', [CompletionResultType]::ParameterName, 'Add ''created'' date in public key information')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;key' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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('add', 'add', [CompletionResultType]::ParameterValue, 'Add a new key to the repository')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;key;add' {
            [CompletionResult]::new('--new-password', '--new-password', [CompletionResultType]::ParameterName, 'New password')
            [CompletionResult]::new('--new-password-file', '--new-password-file', [CompletionResultType]::ParameterName, 'File from which to read the new password')
            [CompletionResult]::new('--new-password-command', '--new-password-command', [CompletionResultType]::ParameterName, 'Command to get the new password from')
            [CompletionResult]::new('--hostname', '--hostname', [CompletionResultType]::ParameterName, 'Set ''hostname'' in public key information')
            [CompletionResult]::new('--username', '--username', [CompletionResultType]::ParameterName, 'Set ''username'' in public key information')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--with-created', '--with-created', [CompletionResultType]::ParameterName, 'Add ''created'' date in public key information')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;key;help' {
            [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add a new key to the repository')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;key;help;add' {
            break
        }
        'rustic;key;help;help' {
            break
        }
        'rustic;list' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;ls' {
            [CompletionResult]::new('--glob', '--glob', [CompletionResultType]::ParameterName, 'Glob pattern to exclude/include (can be specified multiple times)')
            [CompletionResult]::new('--iglob', '--iglob', [CompletionResultType]::ParameterName, 'Same as --glob pattern but ignores the casing of filenames')
            [CompletionResult]::new('--glob-file', '--glob-file', [CompletionResultType]::ParameterName, 'Read glob patterns to exclude/include from this file (can be specified multiple times)')
            [CompletionResult]::new('--iglob-file', '--iglob-file', [CompletionResultType]::ParameterName, 'Same as --glob-file ignores the casing of filenames in patterns')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-s', '-s', [CompletionResultType]::ParameterName, 'show summary')
            [CompletionResult]::new('--summary', '--summary', [CompletionResultType]::ParameterName, 'show summary')
            [CompletionResult]::new('-l', '-l', [CompletionResultType]::ParameterName, 'show long listing')
            [CompletionResult]::new('--long', '--long', [CompletionResultType]::ParameterName, 'show long listing')
            [CompletionResult]::new('--numeric-uid-gid', '--numeric-uid-gid', [CompletionResultType]::ParameterName, 'show uid/gid instead of user/group')
            [CompletionResult]::new('--recursive', '--recursive', [CompletionResultType]::ParameterName, 'recursively list the dir')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;merge' {
            [CompletionResult]::new('--label', '--label', [CompletionResultType]::ParameterName, 'Label snapshot with given label')
            [CompletionResult]::new('--tag', '--tag', [CompletionResultType]::ParameterName, 'Tags to add to snapshot (can be specified multiple times)')
            [CompletionResult]::new('--description', '--description', [CompletionResultType]::ParameterName, 'Add description to snapshot')
            [CompletionResult]::new('--description-from', '--description-from', [CompletionResultType]::ParameterName, 'Add description to snapshot from file')
            [CompletionResult]::new('--time', '--time', [CompletionResultType]::ParameterName, 'Set the backup time manually')
            [CompletionResult]::new('--delete-after', '--delete-after', [CompletionResultType]::ParameterName, 'Mark snapshot to be deleted after given duration (e.g. 10d)')
            [CompletionResult]::new('--host', '--host', [CompletionResultType]::ParameterName, 'Set the host name manually')
            [CompletionResult]::new('--command', '--command', [CompletionResultType]::ParameterName, 'Set the backup command manually')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Output generated snapshot in json format')
            [CompletionResult]::new('--delete', '--delete', [CompletionResultType]::ParameterName, 'Remove input snapshots after merging')
            [CompletionResult]::new('--delete-never', '--delete-never', [CompletionResultType]::ParameterName, 'Mark snapshot as uneraseable')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;snapshots' {
            [CompletionResult]::new('-g', '-g', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags')
            [CompletionResult]::new('--group-by', '--group-by', [CompletionResultType]::ParameterName, 'Group snapshots by any combination of host,label,paths,tags')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--long', '--long', [CompletionResultType]::ParameterName, 'Show detailed information about snapshots')
            [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Show snapshots in json format')
            [CompletionResult]::new('--all', '--all', [CompletionResultType]::ParameterName, 'Show all snapshots instead of summarizing identical follow-up snapshots')
            [CompletionResult]::new('-i', '-i', [CompletionResultType]::ParameterName, 'Run in interactive UI mode')
            [CompletionResult]::new('--interactive', '--interactive', [CompletionResultType]::ParameterName, 'Run in interactive UI mode')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;show-config' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;self-update' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--force', '--force', [CompletionResultType]::ParameterName, 'Do not ask before processing the self-update')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;prune' {
            [CompletionResult]::new('--max-repack', '--max-repack', [CompletionResultType]::ParameterName, 'Define maximum data to repack in % of reposize or as size (e.g. ''5b'', ''2 kB'', ''3M'', ''4TiB'') or ''unlimited''')
            [CompletionResult]::new('--max-unused', '--max-unused', [CompletionResultType]::ParameterName, 'Tolerate limit of unused data in % of reposize after pruning or as size (e.g. ''5b'', ''2 kB'', ''3M'', ''4TiB'') or ''unlimited''')
            [CompletionResult]::new('--keep-pack', '--keep-pack', [CompletionResultType]::ParameterName, 'Minimum duration (e.g. 90d) to keep packs before repacking or removing. More recently created packs won''t be repacked or marked for deletion within this prune run')
            [CompletionResult]::new('--keep-delete', '--keep-delete', [CompletionResultType]::ParameterName, 'Minimum duration (e.g. 10m) to keep packs marked for deletion. More recently marked packs won''t be deleted within this prune run')
            [CompletionResult]::new('--repack-cacheable-only', '--repack-cacheable-only', [CompletionResultType]::ParameterName, 'Only repack packs which are cacheable [default: true for a hot/cold repository, else false]')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--instant-delete', '--instant-delete', [CompletionResultType]::ParameterName, 'Delete files immediately instead of marking them. This also removes all files already marked for deletion')
            [CompletionResult]::new('--early-delete-index', '--early-delete-index', [CompletionResultType]::ParameterName, 'Delete index files early. This allows to run prune if there is few or no space left')
            [CompletionResult]::new('--fast-repack', '--fast-repack', [CompletionResultType]::ParameterName, 'Simply copy blobs when repacking instead of decrypting; possibly compressing; encrypting')
            [CompletionResult]::new('--repack-uncompressed', '--repack-uncompressed', [CompletionResultType]::ParameterName, 'Repack packs containing uncompressed blobs. This cannot be used with --fast-repack. Implies --max-unused=0')
            [CompletionResult]::new('--repack-all', '--repack-all', [CompletionResultType]::ParameterName, 'Repack all packs. Implies --max-unused=0')
            [CompletionResult]::new('--no-resize', '--no-resize', [CompletionResultType]::ParameterName, 'Do not repack packs which only needs to be resized')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;restore' {
            [CompletionResult]::new('--glob', '--glob', [CompletionResultType]::ParameterName, 'Glob pattern to exclude/include (can be specified multiple times)')
            [CompletionResult]::new('--iglob', '--iglob', [CompletionResultType]::ParameterName, 'Same as --glob pattern but ignores the casing of filenames')
            [CompletionResult]::new('--glob-file', '--glob-file', [CompletionResultType]::ParameterName, 'Read glob patterns to exclude/include from this file (can be specified multiple times)')
            [CompletionResult]::new('--iglob-file', '--iglob-file', [CompletionResultType]::ParameterName, 'Same as --glob-file ignores the casing of filenames in patterns')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--delete', '--delete', [CompletionResultType]::ParameterName, 'Remove all files/dirs in destination which are not contained in snapshot')
            [CompletionResult]::new('--numeric-id', '--numeric-id', [CompletionResultType]::ParameterName, 'Use numeric ids instead of user/group when restoring uid/gui')
            [CompletionResult]::new('--no-ownership', '--no-ownership', [CompletionResultType]::ParameterName, 'Don''t restore ownership (user/group)')
            [CompletionResult]::new('--verify-existing', '--verify-existing', [CompletionResultType]::ParameterName, 'Always read and verify existing files (don''t trust correct modification time and file size)')
            [CompletionResult]::new('--recursive', '--recursive', [CompletionResultType]::ParameterName, 'recursively list the dir')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;repair' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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('index', 'index', [CompletionResultType]::ParameterValue, 'Repair the repository index')
            [CompletionResult]::new('snapshots', 'snapshots', [CompletionResultType]::ParameterValue, 'Repair snapshots')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;repair;index' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--read-all', '--read-all', [CompletionResultType]::ParameterName, 'Read all data packs, i.e. completely re-create the index')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;repair;snapshots' {
            [CompletionResult]::new('--suffix', '--suffix', [CompletionResultType]::ParameterName, 'Append this suffix to repaired directory or file name')
            [CompletionResult]::new('--tag', '--tag', [CompletionResultType]::ParameterName, 'Tag list to set on repaired snapshots (can be specified multiple times)')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--delete', '--delete', [CompletionResultType]::ParameterName, 'Also remove defect snapshots')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;repair;help' {
            [CompletionResult]::new('index', 'index', [CompletionResultType]::ParameterValue, 'Repair the repository index')
            [CompletionResult]::new('snapshots', 'snapshots', [CompletionResultType]::ParameterValue, 'Repair snapshots')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;repair;help;index' {
            break
        }
        'rustic;repair;help;snapshots' {
            break
        }
        'rustic;repair;help;help' {
            break
        }
        'rustic;repoinfo' {
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--only-files', '--only-files', [CompletionResultType]::ParameterName, 'Only scan repository files (doesn''t need repository password)')
            [CompletionResult]::new('--only-index', '--only-index', [CompletionResultType]::ParameterName, 'Only scan index')
            [CompletionResult]::new('--json', '--json', [CompletionResultType]::ParameterName, 'Show infos in json format')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;tag' {
            [CompletionResult]::new('--add', '--add', [CompletionResultType]::ParameterName, 'Tags to add (can be specified multiple times)')
            [CompletionResult]::new('--remove', '--remove', [CompletionResultType]::ParameterName, 'Tags to remove (can be specified multiple times)')
            [CompletionResult]::new('--set', '--set', [CompletionResultType]::ParameterName, 'Tag list to set (can be specified multiple times)')
            [CompletionResult]::new('--set-delete-after', '--set-delete-after', [CompletionResultType]::ParameterName, 'Mark snapshot to be deleted after given duration (e.g. 10d)')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--remove-delete', '--remove-delete', [CompletionResultType]::ParameterName, 'Remove any delete mark')
            [CompletionResult]::new('--set-delete-never', '--set-delete-never', [CompletionResultType]::ParameterName, 'Mark snapshot as uneraseable')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;webdav' {
            [CompletionResult]::new('--address', '--address', [CompletionResultType]::ParameterName, 'Address to bind the webdav server to. [default: "localhost:8000"]')
            [CompletionResult]::new('--path-template', '--path-template', [CompletionResultType]::ParameterName, 'The path template to use for snapshots. {id}, {id_long}, {time}, {username}, {hostname}, {label}, {tags}, {backup_start}, {backup_end} are replaced. [default: "[{hostname}]/[{label}]/{time}"]')
            [CompletionResult]::new('--time-template', '--time-template', [CompletionResultType]::ParameterName, 'The time template to use to display times in the path template. See https://docs.rs/chrono/latest/chrono/format/strftime/index.html for format options. [default: "%Y-%m-%d_%H-%M-%S"]')
            [CompletionResult]::new('--file-access', '--file-access', [CompletionResultType]::ParameterName, 'How to handle access to files. [default: "forbidden" for hot/cold repositories, else "read"]')
            [CompletionResult]::new('-P', '-P ', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--use-profile', '--use-profile', [CompletionResultType]::ParameterName, 'Config profile to use. This parses the file `<PROFILE>.toml` in the config directory. [default: "rustic"]')
            [CompletionResult]::new('--log-level', '--log-level', [CompletionResultType]::ParameterName, 'Use this log level [default: info]')
            [CompletionResult]::new('--log-file', '--log-file', [CompletionResultType]::ParameterName, 'Write log messages to the given file instead of printing them')
            [CompletionResult]::new('--progress-interval', '--progress-interval', [CompletionResultType]::ParameterName, 'Interval to update progress bars')
            [CompletionResult]::new('-r', '-r', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repository', '--repository', [CompletionResultType]::ParameterName, 'Repository to use')
            [CompletionResult]::new('--repo-hot', '--repo-hot', [CompletionResultType]::ParameterName, 'Repository to use as hot storage')
            [CompletionResult]::new('--password', '--password', [CompletionResultType]::ParameterName, 'Password of the repository')
            [CompletionResult]::new('-p', '-p', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-file', '--password-file', [CompletionResultType]::ParameterName, 'File to read the password from')
            [CompletionResult]::new('--password-command', '--password-command', [CompletionResultType]::ParameterName, 'Command to read the password from. Password is read from stdout')
            [CompletionResult]::new('--cache-dir', '--cache-dir', [CompletionResultType]::ParameterName, 'Use this dir as cache dir instead of the standard cache dir')
            [CompletionResult]::new('--warm-up-command', '--warm-up-command', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by running the command with %id replaced by pack id')
            [CompletionResult]::new('--warm-up-wait', '--warm-up-wait', [CompletionResultType]::ParameterName, 'Duration (e.g. 10m) to wait after warm up')
            [CompletionResult]::new('--filter-host', '--filter-host', [CompletionResultType]::ParameterName, 'Hostname to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-label', '--filter-label', [CompletionResultType]::ParameterName, 'Label to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-paths', '--filter-paths', [CompletionResultType]::ParameterName, 'Path list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-tags', '--filter-tags', [CompletionResultType]::ParameterName, 'Tag list to filter (can be specified multiple times)')
            [CompletionResult]::new('--filter-fn', '--filter-fn', [CompletionResultType]::ParameterName, 'Function to filter snapshots')
            [CompletionResult]::new('--symlinks', '--symlinks', [CompletionResultType]::ParameterName, 'Use symlinks. This may not be supported by all WebDAV clients')
            [CompletionResult]::new('-n', '-n', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--dry-run', '--dry-run', [CompletionResultType]::ParameterName, 'Only show what would be done without modifying anything. Does not affect read-only commands')
            [CompletionResult]::new('--check-index', '--check-index', [CompletionResultType]::ParameterName, 'Check if index matches pack files and read pack headers if neccessary')
            [CompletionResult]::new('--no-progress', '--no-progress', [CompletionResultType]::ParameterName, 'Don''t show any progress bar')
            [CompletionResult]::new('--no-cache', '--no-cache', [CompletionResultType]::ParameterName, 'Don''t use a cache')
            [CompletionResult]::new('--warm-up', '--warm-up', [CompletionResultType]::ParameterName, 'Warm up needed data pack files by only requesting them without processing')
            [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
        }
        'rustic;help' {
            [CompletionResult]::new('backup', 'backup', [CompletionResultType]::ParameterValue, 'Backup to the repository')
            [CompletionResult]::new('cat', 'cat', [CompletionResultType]::ParameterValue, 'Show raw data of repository files and blobs')
            [CompletionResult]::new('config', 'config', [CompletionResultType]::ParameterValue, 'Change the repository configuration')
            [CompletionResult]::new('completions', 'completions', [CompletionResultType]::ParameterValue, 'Generate shell completions')
            [CompletionResult]::new('check', 'check', [CompletionResultType]::ParameterValue, 'Check the repository')
            [CompletionResult]::new('copy', 'copy', [CompletionResultType]::ParameterValue, 'Copy snapshots to other repositories. Note: The target repositories must be given in the config file!')
            [CompletionResult]::new('diff', 'diff', [CompletionResultType]::ParameterValue, 'Compare two snapshots/paths Note that the exclude options only apply for comparison with a local path')
            [CompletionResult]::new('dump', 'dump', [CompletionResultType]::ParameterValue, 'dump the contents of a file in a snapshot to stdout')
            [CompletionResult]::new('find', 'find', [CompletionResultType]::ParameterValue, 'Find in given snapshots')
            [CompletionResult]::new('forget', 'forget', [CompletionResultType]::ParameterValue, 'Remove snapshots from the repository')
            [CompletionResult]::new('init', 'init', [CompletionResultType]::ParameterValue, 'Initialize a new repository')
            [CompletionResult]::new('key', 'key', [CompletionResultType]::ParameterValue, 'Manage keys')
            [CompletionResult]::new('list', 'list', [CompletionResultType]::ParameterValue, 'List repository files')
            [CompletionResult]::new('ls', 'ls', [CompletionResultType]::ParameterValue, 'List file contents of a snapshot')
            [CompletionResult]::new('merge', 'merge', [CompletionResultType]::ParameterValue, 'Merge snapshots')
            [CompletionResult]::new('snapshots', 'snapshots', [CompletionResultType]::ParameterValue, 'Show a detailed overview of the snapshots within the repository')
            [CompletionResult]::new('show-config', 'show-config', [CompletionResultType]::ParameterValue, 'Show the configuration which has been read from the config file(s)')
            [CompletionResult]::new('self-update', 'self-update', [CompletionResultType]::ParameterValue, 'Update to the latest rustic release')
            [CompletionResult]::new('prune', 'prune', [CompletionResultType]::ParameterValue, 'Remove unused data or repack repository pack files')
            [CompletionResult]::new('restore', 'restore', [CompletionResultType]::ParameterValue, 'Restore a snapshot/path')
            [CompletionResult]::new('repair', 'repair', [CompletionResultType]::ParameterValue, 'Repair a snapshot/path')
            [CompletionResult]::new('repoinfo', 'repoinfo', [CompletionResultType]::ParameterValue, 'Show general information about the repository')
            [CompletionResult]::new('tag', 'tag', [CompletionResultType]::ParameterValue, 'Change tags of snapshots')
            [CompletionResult]::new('webdav', 'webdav', [CompletionResultType]::ParameterValue, 'Start a webdav server which allows to access the repository')
            [CompletionResult]::new('help', 'help', [CompletionResultType]::ParameterValue, 'Print this message or the help of the given subcommand(s)')
            break
        }
        'rustic;help;backup' {
            break
        }
        'rustic;help;cat' {
            [CompletionResult]::new('tree-blob', 'tree-blob', [CompletionResultType]::ParameterValue, 'Display a tree blob')
            [CompletionResult]::new('data-blob', 'data-blob', [CompletionResultType]::ParameterValue, 'Display a data blob')
            [CompletionResult]::new('config', 'config', [CompletionResultType]::ParameterValue, 'Display the config file')
            [CompletionResult]::new('index', 'index', [CompletionResultType]::ParameterValue, 'Display an index file')
            [CompletionResult]::new('snapshot', 'snapshot', [CompletionResultType]::ParameterValue, 'Display a snapshot file')
            [CompletionResult]::new('tree', 'tree', [CompletionResultType]::ParameterValue, 'Display a tree within a snapshot')
            break
        }
        'rustic;help;cat;tree-blob' {
            break
        }
        'rustic;help;cat;data-blob' {
            break
        }
        'rustic;help;cat;config' {
            break
        }
        'rustic;help;cat;index' {
            break
        }
        'rustic;help;cat;snapshot' {
            break
        }
        'rustic;help;cat;tree' {
            break
        }
        'rustic;help;config' {
            break
        }
        'rustic;help;completions' {
            break
        }
        'rustic;help;check' {
            break
        }
        'rustic;help;copy' {
            break
        }
        'rustic;help;diff' {
            break
        }
        'rustic;help;dump' {
            break
        }
        'rustic;help;find' {
            break
        }
        'rustic;help;forget' {
            break
        }
        'rustic;help;init' {
            break
        }
        'rustic;help;key' {
            [CompletionResult]::new('add', 'add', [CompletionResultType]::ParameterValue, 'Add a new key to the repository')
            break
        }
        'rustic;help;key;add' {
            break
        }
        'rustic;help;list' {
            break
        }
        'rustic;help;ls' {
            break
        }
        'rustic;help;merge' {
            break
        }
        'rustic;help;snapshots' {
            break
        }
        'rustic;help;show-config' {
            break
        }
        'rustic;help;self-update' {
            break
        }
        'rustic;help;prune' {
            break
        }
        'rustic;help;restore' {
            break
        }
        'rustic;help;repair' {
            [CompletionResult]::new('index', 'index', [CompletionResultType]::ParameterValue, 'Repair the repository index')
            [CompletionResult]::new('snapshots', 'snapshots', [CompletionResultType]::ParameterValue, 'Repair snapshots')
            break
        }
        'rustic;help;repair;index' {
            break
        }
        'rustic;help;repair;snapshots' {
            break
        }
        'rustic;help;repoinfo' {
            break
        }
        'rustic;help;tag' {
            break
        }
        'rustic;help;webdav' {
            break
        }
        'rustic;help;help' {
            break
        }
    })

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