# bash completion for iceblock, from `iceblock completions bash`
_iceblock() {
    local cur=${COMP_WORDS[COMP_CWORD]}
    if [ "$COMP_CWORD" -eq 1 ]; then
        COMPREPLY=($(compgen -W 'help ls add consume read update mv rm restore restore-version purge important level comments comment edit-comment uncomment conflicts resolve holds accept-hold reject-hold collections collection-new collection-hide collection-show collection-rename split link unlink collection-important collection-level collection-give collections-offered shares-to-move shares-move mount unmount whoami status replication notices dismiss confirm override owner-name config device-kind offline online offpeak sync-every version completions serve join merge sync connect reach-link reach-open replicate map reachability relay-set relay-serve throughput join-asks join-answer trust presence migrate migrate-ask scope remove compromised lost cancel-wipe decline-wipe rekey scope-request scope-requests scope-approve scope-offer scope-deny scope-undeny apps permission-revoke network-card share gift shares share-link share-revoke share-remove share-remove-recipient share-edit share-move share-approve share-decline share-open share-get shared-with-me share-pull pending-files groups group-new group-invite group-join group-approve group-decline group-role group-remove group-leave group-app-add group-app-use group-app-out group-sync group-collection-new group-collection-role group-collection-drop group-collection-give group-collection-transfer group-proposals group-proposal-approve group-proposal-decline group-keep-members group-storage group-level group-promote group-promotion group-hand-over group-disband volumes volume-add volume-remove volume-keep sweep backup backup-make backup-exclude backup-password backup-remove recover lend lendings lend-link lend-confirm lend-end borrow borrowings borrow-end lend-to lend-back ask-storage storage-mail mail-accept mail-grant mail-decline block unblock blocked diag sources source-add source-scan source-pause source-resume source-consume source-per-file source-continuous source-propagate source-cancel' -- "$cur"))
    elif [ "$COMP_CWORD" -eq 2 ] && [ "${COMP_WORDS[1]}" = help ]; then
        COMPREPLY=($(compgen -W 'help ls add consume read update mv rm restore restore-version purge important level comments comment edit-comment uncomment conflicts resolve holds accept-hold reject-hold collections collection-new collection-hide collection-show collection-rename split link unlink collection-important collection-level collection-give collections-offered shares-to-move shares-move mount unmount whoami status replication notices dismiss confirm override owner-name config device-kind offline online offpeak sync-every version completions serve join merge sync connect reach-link reach-open replicate map reachability relay-set relay-serve throughput join-asks join-answer trust presence migrate migrate-ask scope remove compromised lost cancel-wipe decline-wipe rekey scope-request scope-requests scope-approve scope-offer scope-deny scope-undeny apps permission-revoke network-card share gift shares share-link share-revoke share-remove share-remove-recipient share-edit share-move share-approve share-decline share-open share-get shared-with-me share-pull pending-files groups group-new group-invite group-join group-approve group-decline group-role group-remove group-leave group-app-add group-app-use group-app-out group-sync group-collection-new group-collection-role group-collection-drop group-collection-give group-collection-transfer group-proposals group-proposal-approve group-proposal-decline group-keep-members group-storage group-level group-promote group-promotion group-hand-over group-disband volumes volume-add volume-remove volume-keep sweep backup backup-make backup-exclude backup-password backup-remove recover lend lendings lend-link lend-confirm lend-end borrow borrowings borrow-end lend-to lend-back ask-storage storage-mail mail-accept mail-grant mail-decline block unblock blocked diag sources source-add source-scan source-pause source-resume source-consume source-per-file source-continuous source-propagate source-cancel' -- "$cur"))
    elif [ "$COMP_CWORD" -eq 2 ] && [ "${COMP_WORDS[1]}" = completions ]; then
        COMPREPLY=($(compgen -W 'bash zsh fish' -- "$cur"))
    else
        COMPREPLY=()
    fi
}
complete -o default -F _iceblock iceblock
