#compdef bcachefs

autoload -U is-at-least

_bcachefs() {
    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]' \
":: :_bcachefs_commands" \
"*::: :->bcachefs" \
&& ret=0
    case $state in
    (bcachefs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
'-m+[]:MODE:(keys formats nodes nodes-ondisk)' \
'--mode=[]:MODE:(keys formats nodes nodes-ondisk)' \
'-b+[Btree to list from]:BTREE: ' \
'--btree=[Btree to list from]:BTREE: ' \
'-k+[Bkey type to list]:BKEY_TYPE: ' \
'--bkey-type=[Bkey type to list]:BKEY_TYPE: ' \
'-l+[Btree depth to descend to (0 == leaves)]:LEVEL: ' \
'--level=[Btree depth to descend to (0 == leaves)]:LEVEL: ' \
'-s+[Start position to list from]:START: ' \
'--start=[Start position to list from]:START: ' \
'-e+[End position]:END: ' \
'--end=[End position]:END: ' \
'-c+[Force color on/off. Default\: autodetect tty]:COLORIZE:(true false)' \
'--colorize=[Force color on/off. Default\: autodetect tty]:COLORIZE:(true false)' \
'-f[Check (fsck) the filesystem first]' \
'--fsck[Check (fsck) the filesystem first]' \
'*-v[Verbose mode]' \
'*--verbose[Verbose mode]' \
'-h[Print help]' \
'--help[Print help]' \
'*::devices:_files' \
&& ret=0
;;
(mount)
_arguments "${_arguments_options[@]}" : \
'-f+[Path to passphrase file]:PASSPHRASE_FILE:_files' \
'--passphrase-file=[Path to passphrase file]:PASSPHRASE_FILE:_files' \
'-k+[Passphrase policy to use in case of an encrypted filesystem. If not specified, the password will be searched for in the keyring. If not found, the password will be prompted or read from stdin, depending on whether the stdin is connected to a terminal or not]:UNLOCK_POLICY:((fail\:"Don'\''t ask for passphrase, if the key cannot be found in the keyring just fail"
wait\:"Wait for passphrase to become available before mounting"
ask\:"Interactively prompt the user for a passphrase"
stdin\:"Try to read the passphrase from \`stdin\` without prompting"))' \
'--key_location=[Passphrase policy to use in case of an encrypted filesystem. If not specified, the password will be searched for in the keyring. If not found, the password will be prompted or read from stdin, depending on whether the stdin is connected to a terminal or not]:UNLOCK_POLICY:((fail\:"Don'\''t ask for passphrase, if the key cannot be found in the keyring just fail"
wait\:"Wait for passphrase to become available before mounting"
ask\:"Interactively prompt the user for a passphrase"
stdin\:"Try to read the passphrase from \`stdin\` without prompting"))' \
'-o+[Mount options]:OPTIONS: ' \
'-t+[]:FS_TYPE: ' \
'--type=[]:FS_TYPE: ' \
'-c+[Force color on/off. Autodetect tty is used to define default\:]:COLORIZE:(true false)' \
'--colorize=[Force color on/off. Autodetect tty is used to define default\:]:COLORIZE:(true false)' \
'*-v[Verbose mode]' \
'*--verbose[Verbose mode]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
'-V[Print version]' \
'--version[Print version]' \
':dev -- Device, or UUID=\<UUID\>:' \
'::mountpoint -- Where the filesystem should be mounted. If not set, then the filesystem won'\''t actually be mounted. But all steps preceeding mounting the filesystem (e.g. asking for passphrase) will still be performed:_files' \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':shell:(bash elvish fish powershell zsh)' \
&& ret=0
;;
(subvolume)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__subvolume_commands" \
"*::: :->subvolume" \
&& ret=0

    case $state in
    (subvolume)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(del)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(snap)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__subvolume__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(subvol)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__subvolume_commands" \
"*::: :->subvolume" \
&& ret=0

    case $state in
    (subvolume)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(new)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Paths:_files' \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(del)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::targets -- Path:_files' \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(snap)
_arguments "${_arguments_options[@]}" : \
'-r[Make snapshot read only]' \
'--read-only[Make snapshot read only]' \
'-h[Print help]' \
'--help[Print help]' \
'::source:_files' \
':dest:_files' \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order]:SORT:(name size time)' \
'--json[Output as JSON]' \
'-t[Show subvolume tree structure (implies -R)]' \
'--tree[Show subvolume tree structure (implies -R)]' \
'-R[List subvolumes recursively]' \
'--recursive[List subvolumes recursively]' \
'-s[Include snapshot subvolumes]' \
'--snapshots[Include snapshot subvolumes]' \
'--readonly[Only show read-only subvolumes]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(ls-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(list-snap)
_arguments "${_arguments_options[@]}" : \
'--sort=[Sort order (flat view only)]:SORT:(name size time)' \
'-f[Show flat list instead of tree]' \
'--flat[Show flat list instead of tree]' \
'--json[Output as JSON]' \
'--readonly[Only show read-only snapshots (flat view only)]' \
'-h[Print help]' \
'--help[Print help]' \
':target -- Filesystem (device, mountpoint, or UUID):_files' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__subvolume__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-subvolume-help-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(set-file-option)
_arguments "${_arguments_options[@]}" : \
'--data_replicas=[Number of data replicas]:#: ' \
'--data-replicas=[Number of data replicas]:#: ' \
'--data_checksum=[]: :(none crc32c crc64 xxhash)' \
'--data-checksum=[]: :(none crc32c crc64 xxhash)' \
'--compression=[]: : ' \
'--background_compression=[]: : ' \
'--background-compression=[]: : ' \
'--foreground_target=[Device or label for foreground writes]:(target): ' \
'--foreground-target=[Device or label for foreground writes]:(target): ' \
'--background_target=[Device or label to move data to in the background]:(target): ' \
'--background-target=[Device or label to move data to in the background]:(target): ' \
'--promote_target=[Device or label to promote data to on read]:(target): ' \
'--promote-target=[Device or label to promote data to on read]:(target): ' \
'--erasure_code=[Enable erasure coding (DO NOT USE YET)]' \
'--erasure-code=[Enable erasure coding (DO NOT USE YET)]' \
'--casefold=[Dirent lookups are casefolded]' \
'--inodes_32bit=[Constrain inode numbers to 32 bits]' \
'--inodes-32bit=[Constrain inode numbers to 32 bits]' \
'--project=[]' \
'--nocow=[Nocow mode\: Writes will be done in place when possible. Snapshots and reflink will still caused writes to be COW Implicitly disables data checksumming, compression and encryption]' \
'--remove-all[Remove all file options]' \
'-h[Print help]' \
'--help[Print help]' \
':files:' \
&& ret=0
;;
(reflink-option-propagate)
_arguments "${_arguments_options[@]}" : \
'--set-may-update[Enable option propagation on old reflink_p extents that predate the may_update_options flag. Requires CAP_SYS_ADMIN. Only needed once per file for filesystems with reflinks created before the flag was introduced.]' \
'-h[Print help (see more with '\''--help'\'')]' \
'--help[Print help (see more with '\''--help'\'')]' \
':files:' \
&& ret=0
;;
(reset-counters)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':fs:' \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(data)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__data_commands" \
"*::: :->data" \
&& ret=0

    case $state in
    (data)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-data-command-$line[1]:"
        case $line[1] in
            (scrub)
_arguments "${_arguments_options[@]}" : \
'-m[Check metadata only]' \
'--metadata[Check metadata only]' \
'-h[Print help]' \
'--help[Print help]' \
':filesystem -- Filesystem path or device:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__data__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-data-help-command-$line[1]:"
        case $line[1] in
            (scrub)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(device)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__device_commands" \
"*::: :->device" \
&& ret=0

    case $state in
    (device)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-device-command-$line[1]:"
        case $line[1] in
            (online)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
&& ret=0
;;
(offline)
_arguments "${_arguments_options[@]}" : \
'-f[Force, if data redundancy will be degraded]' \
'--force[Force, if data redundancy will be degraded]' \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
'-f[Force removal, even if some data couldn'\''t be migrated]' \
'--force[Force removal, even if some data couldn'\''t be migrated]' \
'-F[Force removal, even if some metadata couldn'\''t be migrated]' \
'--force-metadata[Force removal, even if some metadata couldn'\''t be migrated]' \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path or numeric device index:' \
'::path -- Filesystem path (required when specifying device by index):' \
&& ret=0
;;
(evacuate)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
&& ret=0
;;
(set-state)
_arguments "${_arguments_options[@]}" : \
'-f[Force if data redundancy will be degraded]' \
'--force[Force if data redundancy will be degraded]' \
'-F[Force even if data will be lost]' \
'--force-if-data-lost[Force even if data will be lost]' \
'-h[Print help]' \
'--help[Print help]' \
':new_state -- Device state:(rw ro evacuating spare)' \
':device -- Device path or numeric device index:' \
'::path -- Filesystem path (required when specifying device by index):' \
&& ret=0
;;
(resize)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
'::size -- New size (human-readable, e.g. 1G); defaults to device size:' \
&& ret=0
;;
(resize-journal)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device path:' \
':size -- New journal size (human-readable, e.g. 1G):' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__device__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-device-help-command-$line[1]:"
        case $line[1] in
            (online)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(offline)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(evacuate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-state)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize-journal)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(dump)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(format)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(mkfs)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(fs)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
":: :_bcachefs__fs_commands" \
"*::: :->fs" \
&& ret=0

    case $state in
    (fs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-fs-command-$line[1]:"
        case $line[1] in
            (usage)
_arguments "${_arguments_options[@]}" : \
'*-f+[Comma-separated list of fields]:FIELDS:(replicas btree compression rebalance_work devices)' \
'*--fields=[Comma-separated list of fields]:FIELDS:(replicas btree compression rebalance_work devices)' \
'--help[Print help]' \
'-a[Print all accounting fields]' \
'--all[Print all accounting fields]' \
'-h[Human-readable units]' \
'--human-readable[Human-readable units]' \
'*::mountpoints -- Filesystem mountpoints:' \
&& ret=0
;;
(top)
_arguments "${_arguments_options[@]}" : \
'--help[Print help]' \
'-h[Human-readable units]' \
'--human-readable[Human-readable units]' \
'::filesystem -- Filesystem path, device, or UUID (default\: current directory):' \
&& ret=0
;;
(timestats)
_arguments "${_arguments_options[@]}" : \
'-s+[Sort by column]:SORT:(name count dur-min dur-max dur-total mean-since mean-recent stddev-since stddev-recent)' \
'--sort=[Sort by column]:SORT:(name count dur-min dur-max dur-total mean-since mean-recent stddev-since stddev-recent)' \
'-i+[Refresh interval in seconds (interactive mode)]:INTERVAL: ' \
'--interval=[Refresh interval in seconds (interactive mode)]:INTERVAL: ' \
'-a[Show stats with zero count]' \
'--all[Show stats with zero count]' \
'--json[Output raw JSON]' \
'--no-device-stats[Skip per-device IO latency stats]' \
'--once[One-shot output (no interactive TUI)]' \
'-h[Print help]' \
'--help[Print help]' \
'::filesystem -- Filesystem UUID, device, or mount point (default\: all):' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__fs__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-fs-help-command-$line[1]:"
        case $line[1] in
            (usage)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(top)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(timestats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
;;
(fsck)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(image)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(migrate)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(reconcile)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(recovery-pass)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(set-fs-option)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(set-passphrase)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Devices (colon-separated or multiple arguments):' \
&& ret=0
;;
(remove-passphrase)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
'*::devices -- Devices (colon-separated or multiple arguments):' \
&& ret=0
;;
(show-super)
_arguments "${_arguments_options[@]}" : \
'-h[Print help]' \
'--help[Print help]' \
&& ret=0
;;
(unlock)
_arguments "${_arguments_options[@]}" : \
'-k+[Keyring to add to]:KEYRING:(session user user_session)' \
'--keyring=[Keyring to add to]:KEYRING:(session user user_session)' \
'-f+[Passphrase file to read from (disables passphrase prompt)]:FILE:_files' \
'--file=[Passphrase file to read from (disables passphrase prompt)]:FILE:_files' \
'-c[Check if a device is encrypted]' \
'--check[Check if a device is encrypted]' \
'-h[Print help]' \
'--help[Print help]' \
':device -- Device:' \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help_commands" \
"*::: :->help" \
&& ret=0

    case $state in
    (help)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-command-$line[1]:"
        case $line[1] in
            (list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(mount)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(completions)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(subvolume)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__subvolume_commands" \
"*::: :->subvolume" \
&& ret=0

    case $state in
    (subvolume)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-subvolume-command-$line[1]:"
        case $line[1] in
            (create)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(delete)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(snapshot)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(list-snapshots)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(set-file-option)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reflink-option-propagate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reset-counters)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(version)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(data)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__data_commands" \
"*::: :->data" \
&& ret=0

    case $state in
    (data)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-data-command-$line[1]:"
        case $line[1] in
            (scrub)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(device)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__device_commands" \
"*::: :->device" \
&& ret=0

    case $state in
    (device)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-device-command-$line[1]:"
        case $line[1] in
            (online)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(offline)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(evacuate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-state)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(resize-journal)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(dump)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(format)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(fs)
_arguments "${_arguments_options[@]}" : \
":: :_bcachefs__help__fs_commands" \
"*::: :->fs" \
&& ret=0

    case $state in
    (fs)
        words=($line[1] "${words[@]}")
        (( CURRENT += 1 ))
        curcontext="${curcontext%:*:*}:bcachefs-help-fs-command-$line[1]:"
        case $line[1] in
            (usage)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(top)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(timestats)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
(fsck)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(image)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(migrate)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(reconcile)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(recovery-pass)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-fs-option)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(set-passphrase)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(remove-passphrase)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(show-super)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(unlock)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
(help)
_arguments "${_arguments_options[@]}" : \
&& ret=0
;;
        esac
    ;;
esac
;;
        esac
    ;;
esac
}

(( $+functions[_bcachefs_commands] )) ||
_bcachefs_commands() {
    local commands; commands=(
'list:List filesystem metadata in textual form' \
'mount:Mount a bcachefs filesystem by its UUID' \
'completions:Generate shell completions' \
'subvolume:Subvolumes-related commands' \
'subvol:Subvolumes-related commands' \
'set-file-option:Set attributes on files in a bcachefs filesystem' \
'reflink-option-propagate:Propagate IO options to reflinked extents' \
'reset-counters:Reset filesystem counters' \
'version:Display version' \
'data:Manage filesystem data' \
'device:Manage devices within a filesystem' \
'dump:Dump filesystem metadata to a qcow2 image' \
'format:Format a new filesystem' \
'mkfs:Format a new filesystem' \
'fs:Manage a running filesystem' \
'fsck:Check an existing filesystem for errors' \
'image:Filesystem image commands' \
'migrate:Migrate an existing ext2/3/4 filesystem to bcachefs in place' \
'reconcile:Reconcile filesystem data' \
'recovery-pass:Run a specific recovery pass' \
'set-fs-option:Set a filesystem option' \
'set-passphrase:Change passphrase on an existing (unmounted) filesystem' \
'remove-passphrase:Remove passphrase on an existing (unmounted) filesystem' \
'show-super:Print superblock information to stdout' \
'unlock:Unlock an encrypted filesystem prior to running/mounting' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs commands' commands "$@"
}
(( $+functions[_bcachefs__completions_commands] )) ||
_bcachefs__completions_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs completions commands' commands "$@"
}
(( $+functions[_bcachefs__data_commands] )) ||
_bcachefs__data_commands() {
    local commands; commands=(
'scrub:Verify checksums and correct errors, if possible' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs data commands' commands "$@"
}
(( $+functions[_bcachefs__data__help_commands] )) ||
_bcachefs__data__help_commands() {
    local commands; commands=(
'scrub:Verify checksums and correct errors, if possible' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs data help commands' commands "$@"
}
(( $+functions[_bcachefs__data__help__help_commands] )) ||
_bcachefs__data__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs data help help commands' commands "$@"
}
(( $+functions[_bcachefs__data__help__scrub_commands] )) ||
_bcachefs__data__help__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs data help scrub commands' commands "$@"
}
(( $+functions[_bcachefs__data__scrub_commands] )) ||
_bcachefs__data__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs data scrub commands' commands "$@"
}
(( $+functions[_bcachefs__device_commands] )) ||
_bcachefs__device_commands() {
    local commands; commands=(
'online:Re-add a device to a running filesystem' \
'offline:Take a device offline, without removing it' \
'remove:Remove a device from a filesystem' \
'evacuate:Migrate data off a device' \
'set-state:Change the state of a device' \
'resize:Resize the filesystem on a device' \
'resize-journal:Resize the journal on a device' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs device commands' commands "$@"
}
(( $+functions[_bcachefs__device__evacuate_commands] )) ||
_bcachefs__device__evacuate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device evacuate commands' commands "$@"
}
(( $+functions[_bcachefs__device__help_commands] )) ||
_bcachefs__device__help_commands() {
    local commands; commands=(
'online:Re-add a device to a running filesystem' \
'offline:Take a device offline, without removing it' \
'remove:Remove a device from a filesystem' \
'evacuate:Migrate data off a device' \
'set-state:Change the state of a device' \
'resize:Resize the filesystem on a device' \
'resize-journal:Resize the journal on a device' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs device help commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__evacuate_commands] )) ||
_bcachefs__device__help__evacuate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help evacuate commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__help_commands] )) ||
_bcachefs__device__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help help commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__offline_commands] )) ||
_bcachefs__device__help__offline_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help offline commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__online_commands] )) ||
_bcachefs__device__help__online_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help online commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__remove_commands] )) ||
_bcachefs__device__help__remove_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help remove commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__resize_commands] )) ||
_bcachefs__device__help__resize_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help resize commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__resize-journal_commands] )) ||
_bcachefs__device__help__resize-journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help resize-journal commands' commands "$@"
}
(( $+functions[_bcachefs__device__help__set-state_commands] )) ||
_bcachefs__device__help__set-state_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device help set-state commands' commands "$@"
}
(( $+functions[_bcachefs__device__offline_commands] )) ||
_bcachefs__device__offline_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device offline commands' commands "$@"
}
(( $+functions[_bcachefs__device__online_commands] )) ||
_bcachefs__device__online_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device online commands' commands "$@"
}
(( $+functions[_bcachefs__device__remove_commands] )) ||
_bcachefs__device__remove_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device remove commands' commands "$@"
}
(( $+functions[_bcachefs__device__resize_commands] )) ||
_bcachefs__device__resize_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device resize commands' commands "$@"
}
(( $+functions[_bcachefs__device__resize-journal_commands] )) ||
_bcachefs__device__resize-journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device resize-journal commands' commands "$@"
}
(( $+functions[_bcachefs__device__set-state_commands] )) ||
_bcachefs__device__set-state_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs device set-state commands' commands "$@"
}
(( $+functions[_bcachefs__dump_commands] )) ||
_bcachefs__dump_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs dump commands' commands "$@"
}
(( $+functions[_bcachefs__format_commands] )) ||
_bcachefs__format_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs format commands' commands "$@"
}
(( $+functions[_bcachefs__fs_commands] )) ||
_bcachefs__fs_commands() {
    local commands; commands=(
'usage:Display detailed filesystem usage' \
'top:Display runtime performance info' \
'timestats:Display bcachefs time statistics' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs fs commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help_commands] )) ||
_bcachefs__fs__help_commands() {
    local commands; commands=(
'usage:Display detailed filesystem usage' \
'top:Display runtime performance info' \
'timestats:Display bcachefs time statistics' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs fs help commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__help_commands] )) ||
_bcachefs__fs__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help help commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__timestats_commands] )) ||
_bcachefs__fs__help__timestats_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help timestats commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__top_commands] )) ||
_bcachefs__fs__help__top_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help top commands' commands "$@"
}
(( $+functions[_bcachefs__fs__help__usage_commands] )) ||
_bcachefs__fs__help__usage_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs help usage commands' commands "$@"
}
(( $+functions[_bcachefs__fs__timestats_commands] )) ||
_bcachefs__fs__timestats_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs timestats commands' commands "$@"
}
(( $+functions[_bcachefs__fs__top_commands] )) ||
_bcachefs__fs__top_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs top commands' commands "$@"
}
(( $+functions[_bcachefs__fs__usage_commands] )) ||
_bcachefs__fs__usage_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fs usage commands' commands "$@"
}
(( $+functions[_bcachefs__fsck_commands] )) ||
_bcachefs__fsck_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs fsck commands' commands "$@"
}
(( $+functions[_bcachefs__help_commands] )) ||
_bcachefs__help_commands() {
    local commands; commands=(
'list:List filesystem metadata in textual form' \
'mount:Mount a bcachefs filesystem by its UUID' \
'completions:Generate shell completions' \
'subvolume:Subvolumes-related commands' \
'set-file-option:Set attributes on files in a bcachefs filesystem' \
'reflink-option-propagate:Propagate IO options to reflinked extents' \
'reset-counters:Reset filesystem counters' \
'version:Display version' \
'data:Manage filesystem data' \
'device:Manage devices within a filesystem' \
'dump:Dump filesystem metadata to a qcow2 image' \
'format:Format a new filesystem' \
'fs:Manage a running filesystem' \
'fsck:Check an existing filesystem for errors' \
'image:Filesystem image commands' \
'migrate:Migrate an existing ext2/3/4 filesystem to bcachefs in place' \
'reconcile:Reconcile filesystem data' \
'recovery-pass:Run a specific recovery pass' \
'set-fs-option:Set a filesystem option' \
'set-passphrase:Change passphrase on an existing (unmounted) filesystem' \
'remove-passphrase:Remove passphrase on an existing (unmounted) filesystem' \
'show-super:Print superblock information to stdout' \
'unlock:Unlock an encrypted filesystem prior to running/mounting' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs help commands' commands "$@"
}
(( $+functions[_bcachefs__help__completions_commands] )) ||
_bcachefs__help__completions_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help completions commands' commands "$@"
}
(( $+functions[_bcachefs__help__data_commands] )) ||
_bcachefs__help__data_commands() {
    local commands; commands=(
'scrub:Verify checksums and correct errors, if possible' \
    )
    _describe -t commands 'bcachefs help data commands' commands "$@"
}
(( $+functions[_bcachefs__help__data__scrub_commands] )) ||
_bcachefs__help__data__scrub_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help data scrub commands' commands "$@"
}
(( $+functions[_bcachefs__help__device_commands] )) ||
_bcachefs__help__device_commands() {
    local commands; commands=(
'online:Re-add a device to a running filesystem' \
'offline:Take a device offline, without removing it' \
'remove:Remove a device from a filesystem' \
'evacuate:Migrate data off a device' \
'set-state:Change the state of a device' \
'resize:Resize the filesystem on a device' \
'resize-journal:Resize the journal on a device' \
    )
    _describe -t commands 'bcachefs help device commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__evacuate_commands] )) ||
_bcachefs__help__device__evacuate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device evacuate commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__offline_commands] )) ||
_bcachefs__help__device__offline_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device offline commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__online_commands] )) ||
_bcachefs__help__device__online_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device online commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__remove_commands] )) ||
_bcachefs__help__device__remove_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device remove commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__resize_commands] )) ||
_bcachefs__help__device__resize_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device resize commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__resize-journal_commands] )) ||
_bcachefs__help__device__resize-journal_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device resize-journal commands' commands "$@"
}
(( $+functions[_bcachefs__help__device__set-state_commands] )) ||
_bcachefs__help__device__set-state_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help device set-state commands' commands "$@"
}
(( $+functions[_bcachefs__help__dump_commands] )) ||
_bcachefs__help__dump_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help dump commands' commands "$@"
}
(( $+functions[_bcachefs__help__format_commands] )) ||
_bcachefs__help__format_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help format commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs_commands] )) ||
_bcachefs__help__fs_commands() {
    local commands; commands=(
'usage:Display detailed filesystem usage' \
'top:Display runtime performance info' \
'timestats:Display bcachefs time statistics' \
    )
    _describe -t commands 'bcachefs help fs commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs__timestats_commands] )) ||
_bcachefs__help__fs__timestats_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fs timestats commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs__top_commands] )) ||
_bcachefs__help__fs__top_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fs top commands' commands "$@"
}
(( $+functions[_bcachefs__help__fs__usage_commands] )) ||
_bcachefs__help__fs__usage_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fs usage commands' commands "$@"
}
(( $+functions[_bcachefs__help__fsck_commands] )) ||
_bcachefs__help__fsck_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help fsck commands' commands "$@"
}
(( $+functions[_bcachefs__help__help_commands] )) ||
_bcachefs__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help help commands' commands "$@"
}
(( $+functions[_bcachefs__help__image_commands] )) ||
_bcachefs__help__image_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help image commands' commands "$@"
}
(( $+functions[_bcachefs__help__list_commands] )) ||
_bcachefs__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help list commands' commands "$@"
}
(( $+functions[_bcachefs__help__migrate_commands] )) ||
_bcachefs__help__migrate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help migrate commands' commands "$@"
}
(( $+functions[_bcachefs__help__mount_commands] )) ||
_bcachefs__help__mount_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help mount commands' commands "$@"
}
(( $+functions[_bcachefs__help__reconcile_commands] )) ||
_bcachefs__help__reconcile_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help reconcile commands' commands "$@"
}
(( $+functions[_bcachefs__help__recovery-pass_commands] )) ||
_bcachefs__help__recovery-pass_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help recovery-pass commands' commands "$@"
}
(( $+functions[_bcachefs__help__reflink-option-propagate_commands] )) ||
_bcachefs__help__reflink-option-propagate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help reflink-option-propagate commands' commands "$@"
}
(( $+functions[_bcachefs__help__remove-passphrase_commands] )) ||
_bcachefs__help__remove-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help remove-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__help__reset-counters_commands] )) ||
_bcachefs__help__reset-counters_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help reset-counters commands' commands "$@"
}
(( $+functions[_bcachefs__help__set-file-option_commands] )) ||
_bcachefs__help__set-file-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help set-file-option commands' commands "$@"
}
(( $+functions[_bcachefs__help__set-fs-option_commands] )) ||
_bcachefs__help__set-fs-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help set-fs-option commands' commands "$@"
}
(( $+functions[_bcachefs__help__set-passphrase_commands] )) ||
_bcachefs__help__set-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help set-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__help__show-super_commands] )) ||
_bcachefs__help__show-super_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help show-super commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume_commands] )) ||
_bcachefs__help__subvolume_commands() {
    local commands; commands=(
'create:' \
'delete:' \
'snapshot:' \
'list:' \
'list-snapshots:List snapshots and their disk usage' \
    )
    _describe -t commands 'bcachefs help subvolume commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__create_commands] )) ||
_bcachefs__help__subvolume__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume create commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__delete_commands] )) ||
_bcachefs__help__subvolume__delete_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume delete commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__list_commands] )) ||
_bcachefs__help__subvolume__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume list commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__list-snapshots_commands] )) ||
_bcachefs__help__subvolume__list-snapshots_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume list-snapshots commands' commands "$@"
}
(( $+functions[_bcachefs__help__subvolume__snapshot_commands] )) ||
_bcachefs__help__subvolume__snapshot_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help subvolume snapshot commands' commands "$@"
}
(( $+functions[_bcachefs__help__unlock_commands] )) ||
_bcachefs__help__unlock_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help unlock commands' commands "$@"
}
(( $+functions[_bcachefs__help__version_commands] )) ||
_bcachefs__help__version_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs help version commands' commands "$@"
}
(( $+functions[_bcachefs__image_commands] )) ||
_bcachefs__image_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs image commands' commands "$@"
}
(( $+functions[_bcachefs__list_commands] )) ||
_bcachefs__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs list commands' commands "$@"
}
(( $+functions[_bcachefs__migrate_commands] )) ||
_bcachefs__migrate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs migrate commands' commands "$@"
}
(( $+functions[_bcachefs__mount_commands] )) ||
_bcachefs__mount_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs mount commands' commands "$@"
}
(( $+functions[_bcachefs__reconcile_commands] )) ||
_bcachefs__reconcile_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reconcile commands' commands "$@"
}
(( $+functions[_bcachefs__recovery-pass_commands] )) ||
_bcachefs__recovery-pass_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs recovery-pass commands' commands "$@"
}
(( $+functions[_bcachefs__reflink-option-propagate_commands] )) ||
_bcachefs__reflink-option-propagate_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reflink-option-propagate commands' commands "$@"
}
(( $+functions[_bcachefs__remove-passphrase_commands] )) ||
_bcachefs__remove-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs remove-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__reset-counters_commands] )) ||
_bcachefs__reset-counters_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs reset-counters commands' commands "$@"
}
(( $+functions[_bcachefs__set-file-option_commands] )) ||
_bcachefs__set-file-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs set-file-option commands' commands "$@"
}
(( $+functions[_bcachefs__set-fs-option_commands] )) ||
_bcachefs__set-fs-option_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs set-fs-option commands' commands "$@"
}
(( $+functions[_bcachefs__set-passphrase_commands] )) ||
_bcachefs__set-passphrase_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs set-passphrase commands' commands "$@"
}
(( $+functions[_bcachefs__show-super_commands] )) ||
_bcachefs__show-super_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs show-super commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume_commands] )) ||
_bcachefs__subvolume_commands() {
    local commands; commands=(
'create:' \
'new:' \
'delete:' \
'del:' \
'snapshot:' \
'snap:' \
'list:' \
'ls:' \
'list-snapshots:List snapshots and their disk usage' \
'ls-snap:List snapshots and their disk usage' \
'list-snap:List snapshots and their disk usage' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs subvolume commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__create_commands] )) ||
_bcachefs__subvolume__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume create commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__delete_commands] )) ||
_bcachefs__subvolume__delete_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume delete commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help_commands] )) ||
_bcachefs__subvolume__help_commands() {
    local commands; commands=(
'create:' \
'delete:' \
'snapshot:' \
'list:' \
'list-snapshots:List snapshots and their disk usage' \
'help:Print this message or the help of the given subcommand(s)' \
    )
    _describe -t commands 'bcachefs subvolume help commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__create_commands] )) ||
_bcachefs__subvolume__help__create_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help create commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__delete_commands] )) ||
_bcachefs__subvolume__help__delete_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help delete commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__help_commands] )) ||
_bcachefs__subvolume__help__help_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help help commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__list_commands] )) ||
_bcachefs__subvolume__help__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help list commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__list-snapshots_commands] )) ||
_bcachefs__subvolume__help__list-snapshots_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help list-snapshots commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__help__snapshot_commands] )) ||
_bcachefs__subvolume__help__snapshot_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume help snapshot commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__list_commands] )) ||
_bcachefs__subvolume__list_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume list commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__list-snapshots_commands] )) ||
_bcachefs__subvolume__list-snapshots_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume list-snapshots commands' commands "$@"
}
(( $+functions[_bcachefs__subvolume__snapshot_commands] )) ||
_bcachefs__subvolume__snapshot_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs subvolume snapshot commands' commands "$@"
}
(( $+functions[_bcachefs__unlock_commands] )) ||
_bcachefs__unlock_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs unlock commands' commands "$@"
}
(( $+functions[_bcachefs__version_commands] )) ||
_bcachefs__version_commands() {
    local commands; commands=()
    _describe -t commands 'bcachefs version commands' commands "$@"
}

if [ "$funcstack[1]" = "_bcachefs" ]; then
    _bcachefs "$@"
else
    compdef _bcachefs bcachefs
fi
