#compdef tarsnap # ------------------------------------------------------------------------------ # Description # ----------- # # Completion script for the tarsnap command # (http://www.tarsnap.com/man.html). # ------------------------------------------------------------------------------ # Authors # ------- # # * Daniel Teunis # _tarsnap(){ local -a commands commands=( '--fsck:Perform some integrity checks on the archives stored' '--fsck-prune:Perform integrity checks and prune broken data' '--list-archives:Print the names of archives stored' '--nuke:Delete all of the archives stored' '--print-stats:Print global statistics concerning the archives stored' '-c:Create an archive containing the specified items and name' '-d:Delete the specified archive' '-r:Read the specified archive, convert it to a tar stream, and write it to stdout' '-t:List archive contents to stdout' '-x:Extract to disk from the archive' ) if (( CURRENT == 2 )); then _describe -t commands 'commands' commands fi return 0 }