#compdef dsnap

autoload -U is-at-least

_dsnap() {
    typeset -A opt_args
    typeset -a _arguments_options
    local ret=1

    if is-at-least 5.2; then
        _arguments_options=(-s -S -C)
    else
        _arguments_options=(-s -C)
    fi

    local context curcontext="$curcontext" state line
    _arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_dsnap_commands" \
"*::: :->dsnap" \
&& ret=0
    case $state in
    (dsnap)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:dsnap-command-$line[1]:"
        case $line[1] in
            (add-branch)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-d+[description for the snapshot]: :_default' \
'--description=[description for the snapshot]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(auto-upgrade)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(base-import)
_arguments "${_arguments_options[@]}" : \
'-p+[path to btrfs snapshot stream file]: :_default' \
'--spath=[path to btrfs snapshot stream file]: :_default' \
'--allow-unverified[allow import without a valid signed SHA-512 checksum]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(base-rebuild)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(base-update)
_arguments "${_arguments_options[@]}" : \
'-y[noconfirm flag]' \
'--noconfirm[noconfirm flag]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(boot-update)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(chroot)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clean-tmp)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clone)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-d+[description for the snapshot]: :_default' \
'--description=[description for the snapshot]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clone-branch)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clone-tree)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(clone-under)
_arguments "${_arguments_options[@]}" : \
'-s+[parent snapshot number]: :_default' \
'--snapshot=[parent snapshot number]: :_default' \
'-b+[source snapshot number to copy]: :_default' \
'--branch=[source snapshot number to copy]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(current)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
"*::external_command:_default" \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshots=[snapshot number]: :_default' \
'-q[delete without asking for confirmation]' \
'--quiet[delete without asking for confirmation]' \
'-n[also delete the booted or deployed snapshot and skip confirmation]' \
'--nuke[also delete the booted or deployed snapshot and skip confirmation]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(deploy)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-S[deploy into secondary snapshot slot]' \
'--secondary[deploy into secondary snapshot slot]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(description)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-d+[description to be added]: :_default' \
'--description=[description to be added]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(difference)
_arguments "${_arguments_options[@]}" : \
'-s+[source snapshot]: :_default' \
'--snapshot1=[source snapshot]: :_default' \
'-t+[target snapshot]: :_default' \
'--snapshot2=[target snapshot]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(edit-config)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(edit-profile)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(efi-update)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(etc-update)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-o+[set output directory]: :_default' \
'--output=[set output directory]: :_default' \
'-k+[GPG key ID or fingerprint used to sign the checksum file]: :_default' \
'--signing-key=[GPG key ID or fingerprint used to sign the checksum file]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(fixdb)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(hollow)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(immutable-disable)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(immutable-enable)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
'-p+[path to btrfs snapshot stream file]: :_default' \
'--spath=[path to btrfs snapshot stream file]: :_default' \
'-d+[description for the snapshot]: :_default' \
'--description=[description for the snapshot]: :_default' \
'--allow-unverified[allow import without a valid signed SHA-512 checksum]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'(-f --force -S --secondary)-p+[package(s) to be installed]: :_default' \
'(-f --force -S --secondary)--package=[package(s) to be installed]: :_default' \
'(-p --package)-P+[profile(s) to be installed]: :_default' \
'(-p --package)--profile=[profile(s) to be installed]: :_default' \
'(-p --package -P --profile)-U+[signed or allowlisted user profile(s) to be installed]: :_default' \
'(-p --package -P --profile)--user-profile=[signed or allowlisted user profile(s) to be installed]: :_default' \
'-l[install into the current live system instead of a snapshot copy]' \
'--live[install into the current live system instead of a snapshot copy]' \
'-y[skip package manager confirmation prompts]' \
'--noconfirm[skip package manager confirmation prompts]' \
'-f[force reinstall distro-snapper-profiles and reload the profile]' \
'--force[force reinstall distro-snapper-profiles and reload the profile]' \
'(-l --live)-S[deploy as secondary]' \
'(-l --live)--secondary[deploy as secondary]' \
'--allow-unverified[allow unsigned, non-allowlisted user profiles; use only for trusted profiles]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(last-update)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-e[exclude dependencies]' \
'--exclude-dependency[exclude dependencies]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(live-chroot)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(new-tree)
_arguments "${_arguments_options[@]}" : \
'-d+[description for the snapshot]: :_default' \
'--description=[description for the snapshot]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(rebuild)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-d+[description for the snapshot]: :_default' \
'--description=[description for the snapshot]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(refresh)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(reset)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(rollback)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-c+[command to run in the snapshot]: :_default' \
'--command=[command to run in the snapshot]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(service)
_arguments "${_arguments_options[@]}" : \
'-e+[unit(s) to enable]: :_default' \
'--enable=[unit(s) to enable]: :_default' \
'-d+[unit(s) to disable]: :_default' \
'--disable=[unit(s) to disable]: :_default' \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(subvolumes)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(tree)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(tree-install)
_arguments "${_arguments_options[@]}" : \
'-t+[root snapshot number of the tree]: :_default' \
'--tree-name=[root snapshot number of the tree]: :_default' \
'(-f --force -S --secondary)-p+[package(s) to be installed]: :_default' \
'(-f --force -S --secondary)--package=[package(s) to be installed]: :_default' \
'(-p --package)-P+[profile(s) to be installed]: :_default' \
'(-p --package)--profile=[profile(s) to be installed]: :_default' \
'(-p --package -P --profile)-U+[signed or allowlisted user profile(s) to be installed]: :_default' \
'(-p --package -P --profile)--user-profile=[signed or allowlisted user profile(s) to be installed]: :_default' \
'-y[skip package manager confirmation prompts]' \
'--noconfirm[skip package manager confirmation prompts]' \
'-f[force reinstall distro-snapper-profiles and reload the profile]' \
'--force[force reinstall distro-snapper-profiles and reload the profile]' \
'-S[deploy as secondary]' \
'--secondary[deploy as secondary]' \
'--allow-unverified[allow unsigned, non-allowlisted user profiles; use only for trusted profiles]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(tree-run)
_arguments "${_arguments_options[@]}" : \
'-t+[root snapshot number of the tree]: :_default' \
'--tree-name=[root snapshot number of the tree]: :_default' \
'-c+[command(s) to run in each snapshot]: :_default' \
'--command=[command(s) to run in each snapshot]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(tree-sync)
_arguments "${_arguments_options[@]}" : \
'-t+[root snapshot number of the tree to sync]: :_default' \
'--tree-name=[root snapshot number of the tree to sync]: :_default' \
'-l[mirror the synced current snapshot into the live deployment]' \
'--live[mirror the synced current snapshot into the live deployment]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(tree-uninstall)
_arguments "${_arguments_options[@]}" : \
'-t+[root snapshot number of the tree]: :_default' \
'--tree-name=[root snapshot number of the tree]: :_default' \
'(-P --profile -U --user-profile)-p+[package(s) to be uninstalled]: :_default' \
'(-P --profile -U --user-profile)--package=[package(s) to be uninstalled]: :_default' \
'-P+[profile(s) to be uninstalled]: :_default' \
'--profile=[profile(s) to be uninstalled]: :_default' \
'-U+[signed or allowlisted user profile(s) to be uninstalled]: :_default' \
'--user-profile=[signed or allowlisted user profile(s) to be uninstalled]: :_default' \
'-y[skip package manager confirmation prompts]' \
'--noconfirm[skip package manager confirmation prompts]' \
'--allow-unverified[allow unsigned, non-allowlisted user profiles; use only for trusted profiles]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(tree-upgrade)
_arguments "${_arguments_options[@]}" : \
'-t+[root snapshot number of the tree]: :_default' \
'--tree-name=[root snapshot number of the tree]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-p+[package(s) to be uninstalled]: :_default' \
'--package=[package(s) to be uninstalled]: :_default' \
'(-p --package)-P+[profile(s) to be uninstalled]: :_default' \
'(-p --package)--profile=[profile(s) to be uninstalled]: :_default' \
'(-p --package -P --profile)-U+[signed or allowlisted user profile(s) to be uninstalled]: :_default' \
'(-p --package -P --profile)--user-profile=[signed or allowlisted user profile(s) to be uninstalled]: :_default' \
'-l[uninstall from the current live system instead of a snapshot copy]' \
'--live[uninstall from the current live system instead of a snapshot copy]' \
'-y[skip package manager confirmation prompts]' \
'--noconfirm[skip package manager confirmation prompts]' \
'--allow-unverified[allow unsigned, non-allowlisted user profiles; use only for trusted profiles]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(unlock)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(upgrade)
_arguments "${_arguments_options[@]}" : \
'-s+[snapshot number]: :_default' \
'--snapshot=[snapshot number]: :_default' \
'-l[upgrade the current live deployment in place; changes cannot be discarded]' \
'--live[upgrade the current live deployment in place; changes cannot be discarded]' \
'-y[skip package manager confirmation prompts]' \
'--noconfirm[skip package manager confirmation prompts]' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(whichsnap)
_arguments "${_arguments_options[@]}" : \
'-p+[package(s) to search for]: :_default' \
'--package=[package(s) to search for]: :_default' \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(whichtmp)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_dsnap__subcmd__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:dsnap-help-command-$line[1]:"
        case $line[1] in
            (add-branch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(auto-upgrade)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(base-import)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(base-rebuild)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(base-update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(boot-update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(chroot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clean-tmp)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clone)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clone-branch)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clone-tree)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(clone-under)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(current)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(deploy)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(description)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(difference)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit-config)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(edit-profile)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(efi-update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(etc-update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(export)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fixdb)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(hollow)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(immutable-disable)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(immutable-enable)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(import)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(last-update)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(live-chroot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(new-tree)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rebuild)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(refresh)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reset)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(rollback)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(service)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(subvolumes)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(tree)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(tree-install)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(tree-run)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(tree-sync)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(tree-uninstall)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(tree-upgrade)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(uninstall)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unlock)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(upgrade)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(whichsnap)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(whichtmp)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_dsnap_commands] )) ||
_dsnap_commands() {
    local commands; commands=(
'add-branch:Create a new child snapshot under the selected snapshot' \
'auto-upgrade:Noninteractively update all packages in a snapshot' \
'base-import:Replace the base snapshot (0) from a btrfs snapshot stream' \
'base-rebuild:Rebuild snapshot 0 from bootstrap packages and its stored profile' \
'base-update:Update all packages in snapshot 0 and refresh the recovery deployment' \
'boot-update:Regenerate GRUB configuration for a snapshot' \
'chroot:Open a root shell in a writable copy of a snapshot and save changes on exit' \
'clean-tmp:Clean unmounted chroot working snapshots' \
'clone:Create a new top-level tree from a copy of a snapshot' \
'clone-branch:Create a sibling snapshot under the same parent' \
'clone-tree:Recursively clone a snapshot and all its descendants' \
'clone-under:Copy a snapshot into a new child of the specified parent' \
'current:Show current snapshot number' \
'delete:Delete snapshot(s) and all descendant snapshots recursively' \
'deploy:Make a snapshot the default boot target for the next boot' \
'description:Set or replace the description of a snapshot' \
'difference:Show package diff between snapshots' \
'edit-config:Edit per-snapshot dsnap configuration (dsnap.conf)' \
'edit-profile:Edit a snapshot'\''s profile (packages, services, and install commands)' \
'efi-update:Interactively switch the EFI boot entry to another distribution' \
'etc-update:Save live /etc changes into the current snapshot' \
'export:Export a snapshot as a compressed btrfs send stream with signed SHA-512 checksum' \
'fixdb:Rebuild the pacman keyring and package database in a snapshot' \
'hollow:Mount a snapshot as writable / and deploy or discard changes' \
'immutable-disable:Disable immutability of a snapshot' \
'immutable-enable:Enable immutability of a snapshot' \
'import:Import a snapshot from a btrfs snapshot stream' \
'install:Install package(s) or profile(s) inside a snapshot' \
'last-update:Check last update status' \
'list:List installed packages in a snapshot' \
'live-chroot:Administrative recovery action\: open a confined shell inside the currently booted snapshot with read-write access. Changes are discarded on new deployment' \
'new-tree:Create a new top-level tree from the base snapshot' \
'rebuild:Create a new top-level tree from a fresh bootstrap using a snapshot'\''s saved profile' \
'refresh:Refresh package repository metadata in a snapshot' \
'reset:Permanently delete all non-base snapshots, deploy snapshot 0, and reboot' \
'rollback:Deploy a clone of the previous deployment for the next boot' \
'run:Run command(s) in a writable copy of a snapshot and save changes' \
'service:Enable or disable systemd unit(s) in a snapshot and update its profile' \
'subvolumes:List btrfs subvolumes for the booted system' \
'tree:Show dsnap tree' \
'tree-install:Install package(s) or profile(s) throughout a snapshot tree' \
'tree-run:Run command(s) in writable copies of a snapshot tree and save changes' \
'tree-sync:Upgrade and sync a snapshot tree recursively (requires an internet connection)' \
'tree-uninstall:Uninstall package(s) or profile(s) throughout a snapshot tree' \
'tree-upgrade:Upgrade all packages in a snapshot tree' \
'uninstall:Uninstall package(s) or profile(s) from a snapshot' \
'unlock:Remove a snapshot'\''s chroot lock and discard uncommitted changes' \
'upgrade:Upgrade all packages in a snapshot' \
'version:Print dsnap version' \
'whichsnap:Show which snapshots have the specified package(s) installed' \
'whichtmp:Show which deployment snapshot is in use' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'dsnap commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__add-branch_commands] )) ||
_dsnap__subcmd__add-branch_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap add-branch commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__auto-upgrade_commands] )) ||
_dsnap__subcmd__auto-upgrade_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap auto-upgrade commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__base-import_commands] )) ||
_dsnap__subcmd__base-import_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap base-import commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__base-rebuild_commands] )) ||
_dsnap__subcmd__base-rebuild_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap base-rebuild commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__base-update_commands] )) ||
_dsnap__subcmd__base-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap base-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__boot-update_commands] )) ||
_dsnap__subcmd__boot-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap boot-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__chroot_commands] )) ||
_dsnap__subcmd__chroot_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap chroot commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__clean-tmp_commands] )) ||
_dsnap__subcmd__clean-tmp_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap clean-tmp commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__clone_commands] )) ||
_dsnap__subcmd__clone_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap clone commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__clone-branch_commands] )) ||
_dsnap__subcmd__clone-branch_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap clone-branch commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__clone-tree_commands] )) ||
_dsnap__subcmd__clone-tree_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap clone-tree commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__clone-under_commands] )) ||
_dsnap__subcmd__clone-under_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap clone-under commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__current_commands] )) ||
_dsnap__subcmd__current_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap current commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__delete_commands] )) ||
_dsnap__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap delete commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__deploy_commands] )) ||
_dsnap__subcmd__deploy_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap deploy commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__description_commands] )) ||
_dsnap__subcmd__description_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap description commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__difference_commands] )) ||
_dsnap__subcmd__difference_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap difference commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__edit-config_commands] )) ||
_dsnap__subcmd__edit-config_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap edit-config commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__edit-profile_commands] )) ||
_dsnap__subcmd__edit-profile_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap edit-profile commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__efi-update_commands] )) ||
_dsnap__subcmd__efi-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap efi-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__etc-update_commands] )) ||
_dsnap__subcmd__etc-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap etc-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__export_commands] )) ||
_dsnap__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap export commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__fixdb_commands] )) ||
_dsnap__subcmd__fixdb_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap fixdb commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help_commands] )) ||
_dsnap__subcmd__help_commands() {
    local commands; commands=(
'add-branch:Create a new child snapshot under the selected snapshot' \
'auto-upgrade:Noninteractively update all packages in a snapshot' \
'base-import:Replace the base snapshot (0) from a btrfs snapshot stream' \
'base-rebuild:Rebuild snapshot 0 from bootstrap packages and its stored profile' \
'base-update:Update all packages in snapshot 0 and refresh the recovery deployment' \
'boot-update:Regenerate GRUB configuration for a snapshot' \
'chroot:Open a root shell in a writable copy of a snapshot and save changes on exit' \
'clean-tmp:Clean unmounted chroot working snapshots' \
'clone:Create a new top-level tree from a copy of a snapshot' \
'clone-branch:Create a sibling snapshot under the same parent' \
'clone-tree:Recursively clone a snapshot and all its descendants' \
'clone-under:Copy a snapshot into a new child of the specified parent' \
'current:Show current snapshot number' \
'delete:Delete snapshot(s) and all descendant snapshots recursively' \
'deploy:Make a snapshot the default boot target for the next boot' \
'description:Set or replace the description of a snapshot' \
'difference:Show package diff between snapshots' \
'edit-config:Edit per-snapshot dsnap configuration (dsnap.conf)' \
'edit-profile:Edit a snapshot'\''s profile (packages, services, and install commands)' \
'efi-update:Interactively switch the EFI boot entry to another distribution' \
'etc-update:Save live /etc changes into the current snapshot' \
'export:Export a snapshot as a compressed btrfs send stream with signed SHA-512 checksum' \
'fixdb:Rebuild the pacman keyring and package database in a snapshot' \
'hollow:Mount a snapshot as writable / and deploy or discard changes' \
'immutable-disable:Disable immutability of a snapshot' \
'immutable-enable:Enable immutability of a snapshot' \
'import:Import a snapshot from a btrfs snapshot stream' \
'install:Install package(s) or profile(s) inside a snapshot' \
'last-update:Check last update status' \
'list:List installed packages in a snapshot' \
'live-chroot:Administrative recovery action\: open a confined shell inside the currently booted snapshot with read-write access. Changes are discarded on new deployment' \
'new-tree:Create a new top-level tree from the base snapshot' \
'rebuild:Create a new top-level tree from a fresh bootstrap using a snapshot'\''s saved profile' \
'refresh:Refresh package repository metadata in a snapshot' \
'reset:Permanently delete all non-base snapshots, deploy snapshot 0, and reboot' \
'rollback:Deploy a clone of the previous deployment for the next boot' \
'run:Run command(s) in a writable copy of a snapshot and save changes' \
'service:Enable or disable systemd unit(s) in a snapshot and update its profile' \
'subvolumes:List btrfs subvolumes for the booted system' \
'tree:Show dsnap tree' \
'tree-install:Install package(s) or profile(s) throughout a snapshot tree' \
'tree-run:Run command(s) in writable copies of a snapshot tree and save changes' \
'tree-sync:Upgrade and sync a snapshot tree recursively (requires an internet connection)' \
'tree-uninstall:Uninstall package(s) or profile(s) throughout a snapshot tree' \
'tree-upgrade:Upgrade all packages in a snapshot tree' \
'uninstall:Uninstall package(s) or profile(s) from a snapshot' \
'unlock:Remove a snapshot'\''s chroot lock and discard uncommitted changes' \
'upgrade:Upgrade all packages in a snapshot' \
'version:Print dsnap version' \
'whichsnap:Show which snapshots have the specified package(s) installed' \
'whichtmp:Show which deployment snapshot is in use' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'dsnap help commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__add-branch_commands] )) ||
_dsnap__subcmd__help__subcmd__add-branch_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help add-branch commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__auto-upgrade_commands] )) ||
_dsnap__subcmd__help__subcmd__auto-upgrade_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help auto-upgrade commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__base-import_commands] )) ||
_dsnap__subcmd__help__subcmd__base-import_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help base-import commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__base-rebuild_commands] )) ||
_dsnap__subcmd__help__subcmd__base-rebuild_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help base-rebuild commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__base-update_commands] )) ||
_dsnap__subcmd__help__subcmd__base-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help base-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__boot-update_commands] )) ||
_dsnap__subcmd__help__subcmd__boot-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help boot-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__chroot_commands] )) ||
_dsnap__subcmd__help__subcmd__chroot_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help chroot commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__clean-tmp_commands] )) ||
_dsnap__subcmd__help__subcmd__clean-tmp_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help clean-tmp commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__clone_commands] )) ||
_dsnap__subcmd__help__subcmd__clone_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help clone commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__clone-branch_commands] )) ||
_dsnap__subcmd__help__subcmd__clone-branch_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help clone-branch commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__clone-tree_commands] )) ||
_dsnap__subcmd__help__subcmd__clone-tree_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help clone-tree commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__clone-under_commands] )) ||
_dsnap__subcmd__help__subcmd__clone-under_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help clone-under commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__current_commands] )) ||
_dsnap__subcmd__help__subcmd__current_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help current commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__delete_commands] )) ||
_dsnap__subcmd__help__subcmd__delete_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help delete commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__deploy_commands] )) ||
_dsnap__subcmd__help__subcmd__deploy_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help deploy commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__description_commands] )) ||
_dsnap__subcmd__help__subcmd__description_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help description commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__difference_commands] )) ||
_dsnap__subcmd__help__subcmd__difference_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help difference commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__edit-config_commands] )) ||
_dsnap__subcmd__help__subcmd__edit-config_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help edit-config commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__edit-profile_commands] )) ||
_dsnap__subcmd__help__subcmd__edit-profile_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help edit-profile commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__efi-update_commands] )) ||
_dsnap__subcmd__help__subcmd__efi-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help efi-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__etc-update_commands] )) ||
_dsnap__subcmd__help__subcmd__etc-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help etc-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__export_commands] )) ||
_dsnap__subcmd__help__subcmd__export_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help export commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__fixdb_commands] )) ||
_dsnap__subcmd__help__subcmd__fixdb_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help fixdb commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__help_commands] )) ||
_dsnap__subcmd__help__subcmd__help_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help help commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__hollow_commands] )) ||
_dsnap__subcmd__help__subcmd__hollow_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help hollow commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__immutable-disable_commands] )) ||
_dsnap__subcmd__help__subcmd__immutable-disable_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help immutable-disable commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__immutable-enable_commands] )) ||
_dsnap__subcmd__help__subcmd__immutable-enable_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help immutable-enable commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__import_commands] )) ||
_dsnap__subcmd__help__subcmd__import_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help import commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__install_commands] )) ||
_dsnap__subcmd__help__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help install commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__last-update_commands] )) ||
_dsnap__subcmd__help__subcmd__last-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help last-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__list_commands] )) ||
_dsnap__subcmd__help__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help list commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__live-chroot_commands] )) ||
_dsnap__subcmd__help__subcmd__live-chroot_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help live-chroot commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__new-tree_commands] )) ||
_dsnap__subcmd__help__subcmd__new-tree_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help new-tree commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__rebuild_commands] )) ||
_dsnap__subcmd__help__subcmd__rebuild_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help rebuild commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__refresh_commands] )) ||
_dsnap__subcmd__help__subcmd__refresh_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help refresh commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__reset_commands] )) ||
_dsnap__subcmd__help__subcmd__reset_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help reset commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__rollback_commands] )) ||
_dsnap__subcmd__help__subcmd__rollback_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help rollback commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__run_commands] )) ||
_dsnap__subcmd__help__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help run commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__service_commands] )) ||
_dsnap__subcmd__help__subcmd__service_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help service commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__subvolumes_commands] )) ||
_dsnap__subcmd__help__subcmd__subvolumes_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help subvolumes commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__tree_commands] )) ||
_dsnap__subcmd__help__subcmd__tree_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help tree commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__tree-install_commands] )) ||
_dsnap__subcmd__help__subcmd__tree-install_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help tree-install commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__tree-run_commands] )) ||
_dsnap__subcmd__help__subcmd__tree-run_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help tree-run commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__tree-sync_commands] )) ||
_dsnap__subcmd__help__subcmd__tree-sync_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help tree-sync commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__tree-uninstall_commands] )) ||
_dsnap__subcmd__help__subcmd__tree-uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help tree-uninstall commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__tree-upgrade_commands] )) ||
_dsnap__subcmd__help__subcmd__tree-upgrade_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help tree-upgrade commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__uninstall_commands] )) ||
_dsnap__subcmd__help__subcmd__uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help uninstall commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__unlock_commands] )) ||
_dsnap__subcmd__help__subcmd__unlock_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help unlock commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__upgrade_commands] )) ||
_dsnap__subcmd__help__subcmd__upgrade_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help upgrade commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__version_commands] )) ||
_dsnap__subcmd__help__subcmd__version_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help version commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__whichsnap_commands] )) ||
_dsnap__subcmd__help__subcmd__whichsnap_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help whichsnap commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__help__subcmd__whichtmp_commands] )) ||
_dsnap__subcmd__help__subcmd__whichtmp_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap help whichtmp commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__hollow_commands] )) ||
_dsnap__subcmd__hollow_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap hollow commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__immutable-disable_commands] )) ||
_dsnap__subcmd__immutable-disable_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap immutable-disable commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__immutable-enable_commands] )) ||
_dsnap__subcmd__immutable-enable_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap immutable-enable commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__import_commands] )) ||
_dsnap__subcmd__import_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap import commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__install_commands] )) ||
_dsnap__subcmd__install_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap install commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__last-update_commands] )) ||
_dsnap__subcmd__last-update_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap last-update commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__list_commands] )) ||
_dsnap__subcmd__list_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap list commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__live-chroot_commands] )) ||
_dsnap__subcmd__live-chroot_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap live-chroot commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__new-tree_commands] )) ||
_dsnap__subcmd__new-tree_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap new-tree commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__rebuild_commands] )) ||
_dsnap__subcmd__rebuild_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap rebuild commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__refresh_commands] )) ||
_dsnap__subcmd__refresh_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap refresh commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__reset_commands] )) ||
_dsnap__subcmd__reset_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap reset commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__rollback_commands] )) ||
_dsnap__subcmd__rollback_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap rollback commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__run_commands] )) ||
_dsnap__subcmd__run_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap run commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__service_commands] )) ||
_dsnap__subcmd__service_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap service commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__subvolumes_commands] )) ||
_dsnap__subcmd__subvolumes_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap subvolumes commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__tree_commands] )) ||
_dsnap__subcmd__tree_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap tree commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__tree-install_commands] )) ||
_dsnap__subcmd__tree-install_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap tree-install commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__tree-run_commands] )) ||
_dsnap__subcmd__tree-run_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap tree-run commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__tree-sync_commands] )) ||
_dsnap__subcmd__tree-sync_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap tree-sync commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__tree-uninstall_commands] )) ||
_dsnap__subcmd__tree-uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap tree-uninstall commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__tree-upgrade_commands] )) ||
_dsnap__subcmd__tree-upgrade_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap tree-upgrade commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__uninstall_commands] )) ||
_dsnap__subcmd__uninstall_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap uninstall commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__unlock_commands] )) ||
_dsnap__subcmd__unlock_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap unlock commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__upgrade_commands] )) ||
_dsnap__subcmd__upgrade_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap upgrade commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__version_commands] )) ||
_dsnap__subcmd__version_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap version commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__whichsnap_commands] )) ||
_dsnap__subcmd__whichsnap_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap whichsnap commands' commands "$@"
}
(( $+functions[_dsnap__subcmd__whichtmp_commands] )) ||
_dsnap__subcmd__whichtmp_commands() {
    local commands; commands=()
    _describe -t commands 'dsnap whichtmp commands' commands "$@"
}

if [ "$funcstack[1]" = "_dsnap" ]; then
    _dsnap "$@"
else
    compdef _dsnap dsnap
fi
