#compdef iceblock
# zsh completion for iceblock, from `iceblock completions zsh`
local -a commands
commands=(
    'help:Says what a command does'
    'ls:Lists the network'\''s files, with their sizes and versions'
    'add:Adds files and folders on this computer to Iceblock under their own…'
    'consume:Takes files and folders into Iceblock as `iceblock add` does, then…'
    'read:Prints a file, or writes it to <path>, fetching it from other devices…'
    'update:Files'
    'mv:Moves or renames a file or folder, paths as in Files'
    'rm:Moves a file to the trash, from which `restore` brings it back'
    'restore:Files'
    'restore-version:Files'
    'purge:Files'
    'important:Files'
    'level:Sets how safely a file is kept'
    'comments:Comments'
    'comment:Comments'
    'edit-comment:Comments'
    'uncomment:Comments'
    'conflicts:Conflicts'
    'resolve:Conflicts'
    'holds:Conflicts'
    'accept-hold:Conflicts'
    'reject-hold:Conflicts'
    'collections:Collections'
    'collection-new:Collections'
    'collection-hide:Keeps a Collection out of Files and of ls, as an app may ask for its…'
    'collection-show:Puts a Collection kept out of Files back'
    'collection-rename:Collections'
    'split:Collections'
    'link:Collections'
    'unlink:Collections'
    'collection-important:Collections'
    'collection-level:Collections'
    'collection-give:Gives the Collection at <path> (its top, as `ls` shows it) to the…'
    'collections-offered:Lists the Collections other networks have offered this one to own…'
    'shares-to-move:Lists the shares a Collection given to this network came with\: its…'
    'shares-move:Moves the old owner'\''s shares of a Collection given here (yes)\: a…'
    'mount:Mounts a Collection (your main one if none'\''s named) at <path>, on…'
    'unmount:Stops mounting anything at <path>, and unmounts it at once if…'
    'whoami:This device'
    'status:Shows how safe the network'\''s files are\: how many devices each could…'
    'replication:This device'
    'notices:This device'
    'dismiss:This device'
    'confirm:Says you'\''ve looked into a notice that asks you to\: changes from a…'
    'override:This device'
    'owner-name:This device'
    'config:Shows or sets where this device'\''s data is'
    'device-kind:This device'
    'offline:This device'
    'online:This device'
    'offpeak:This device'
    'sync-every:This device'
    'version:This device'
    'completions:Prints the script that completes iceblock'\''s commands in that shell'
    'serve:Serves this device until stopped\: syncs, replicates and answers other…'
    'join:Joins the network an invitation is from'
    'merge:Network'
    'sync:Exchanges changes to the network'\''s metadata with every other device…'
    'connect:Network'
    'reach-link:Prints a link saying how to reach this network now\: its devices'\''…'
    'reach-open:Opens another network'\''s reach link\: keeps how to reach it, brings…'
    'replicate:Network'
    'map:Network'
    'reachability:Network'
    'relay-set:Network'
    'relay-serve:Network'
    'throughput:Network'
    'join-asks:Lists the devices asking to join this network, waiting for an answer…'
    'join-answer:Lets a device asking to join in, at that trust (an app at app), or…'
    'trust:Devices'
    'presence:Devices'
    'migrate:Moves files off this device\: copies what the others need to keep them…'
    'migrate-ask:Asks another device to move everything off itself at its next sync…'
    'scope:Devices'
    'remove:Devices'
    'compromised:Devices'
    'lost:Devices'
    'cancel-wipe:Devices'
    'decline-wipe:Devices'
    'rekey:Devices'
    'scope-request:On an app (a device paired at Scoped trust)\: asks for a Collection…'
    'scope-requests:Lists the apps asking for a Collection or a permission, with what'\''s…'
    'scope-approve:Gives an app the Collection it asked for, and what'\''s linked inside it…'
    'scope-offer:Gives an app a Collection, or a permission, it didn'\''t ask for'
    'scope-deny:Denies an app'\''s request for a Collection or a permission\: its…'
    'scope-undeny:Takes a denial away\: the app may ask for it again'
    'apps:Lists the apps built on Iceblock on the network\: each app'\''s id…'
    'permission-revoke:Takes a permission back from an app\: a Collection (collection\:<id>)…'
    'network-card:Sharing'
    'share:Shares a file or folder, printing the link for it'
    'gift:Sharing'
    'shares:Sharing'
    'share-link:Sharing'
    'share-revoke:Sharing'
    'share-remove:Forgets a share that'\''s revoked or has expired'
    'share-remove-recipient:Stops giving a share to one network (by fingerprint, or its owner'\''s…'
    'share-edit:Changes a share after it'\''s given'
    'share-move:Moves a share'\''s recipients to another share, of the same Collection…'
    'share-approve:Sharing'
    'share-decline:Sharing'
    'share-open:Opens something shared with this network'
    'share-get:Sharing'
    'shared-with-me:Sharing'
    'share-pull:Sharing'
    'pending-files:Lists files other members wrote to Collections held together that…'
    'groups:Lists the groups of networks this one belongs to, with their members…'
    'group-new:Makes a group of networks, with this one its home and its first Owner'
    'group-invite:Invites a network to a group with a role, printing the link to send…'
    'group-join:Joins the group an invitation is to, or asks to, if it needs approval'
    'group-approve:Lets in a network asking to join, with the invitation'\''s role or…'
    'group-decline:Declines a network asking to join'
    'group-role:Changes a member'\''s role in a group, as your own role there allows'
    'group-remove:Takes a network out of a group, as your role there allows'
    'group-leave:Leaves a group'
    'group-app-add:Adds an app (one of your network'\''s, or this one if it'\''s the app) to a…'
    'group-app-use:Whether you use a group'\''s app\: only those that do have its Collections'
    'group-app-out:Proposes taking an app out of a group\: its Collections stay the…'
    'group-sync:Brings each group'\''s members up to date from its home'
    'group-collection-new:Makes a Collection of the group'\''s, at its home, for its members to…'
    'group-collection-role:Sets a member'\''s role in one of the group'\''s Collections, or (with…'
    'group-collection-drop:Proposes taking a Collection out of the group (#242), the home…'
    'group-collection-give:Gives the group the Collection at <path>, one of this network'\''s own…'
    'group-collection-transfer:Proposes giving one of the group'\''s Collections to a member to own…'
    'group-proposals:Groups'
    'group-proposal-approve:Groups'
    'group-proposal-decline:Groups'
    'group-keep-members:Once a Collection given to this network out of a group is its own…'
    'group-storage:Lends a group storage, up to <GB> in all\: for its Collections…'
    'group-level:Keeps this network'\''s own copies of a group'\''s Collections at that…'
    'group-promote:Offers a member an Owner'\''s role, for 24 hours or as long as said\: the…'
    'group-promotion:Takes, or declines, the Owner'\''s role you'\''re offered in a group'
    'group-hand-over:Hands the group this network keeps to another Owner, which keeps it…'
    'group-disband:Ends a group\: its Collections stay with its home, and go from…'
    'volumes:Lists the disks this device keeps the network'\''s pieces on, and their…'
    'volume-add:Storage'
    'volume-remove:Storage'
    'volume-keep:Storage'
    'sweep:Storage'
    'backup:Shows this device'\''s backup drive\: plugged in or away, how complete…'
    'backup-make:Makes a folder on a disk of its own this device'\''s backup drive (a…'
    'backup-exclude:Sets which Collections the backup drive leaves off; with none named…'
    'backup-password:Changes the backup drive'\''s password, asking for the old one and the…'
    'backup-remove:Stops using the backup drive'
    'recover:On a fresh install, recovers the network from a backup drive, asking…'
    'lend:Lending'
    'lendings:Lending'
    'lend-link:Lending'
    'lend-confirm:Lending'
    'lend-end:Lending'
    'borrow:Lending'
    'borrowings:Lending'
    'borrow-end:Lending'
    'lend-to:Lending'
    'lend-back:Lending'
    'ask-storage:Lending'
    'storage-mail:Lending'
    'mail-accept:Lending'
    'mail-grant:Lending'
    'mail-decline:Lending'
    'block:Lending'
    'unblock:Lending'
    'blocked:Lending'
    'diag:Diagnostics'
    'sources:Sources'
    'source-add:Sources'
    'source-scan:Sources'
    'source-pause:Sources'
    'source-resume:Sources'
    'source-consume:Sources'
    'source-per-file:Sources'
    'source-continuous:Sources'
    'source-propagate:Sources'
    'source-cancel:Sources'
)
if (( CURRENT == 2 )); then
    _describe -t commands 'iceblock command' commands
elif (( CURRENT == 3 )) && [[ $words[2] == help ]]; then
    _describe -t commands 'iceblock command' commands
elif (( CURRENT == 3 )) && [[ $words[2] == completions ]]; then
    compadd bash zsh fish
else
    _files
fi
