Add tarsnap completion
This commit is contained in:
		
							parent
							
								
									25d1555535
								
							
						
					
					
						commit
						c5c5fe7f37
					
				|  | @ -0,0 +1,35 @@ | ||||||
|  | #compdef tarsnap | ||||||
|  | # ------------------------------------------------------------------------------ | ||||||
|  | # Description | ||||||
|  | # ----------- | ||||||
|  | # | ||||||
|  | #  Completion script for the tarsnap command | ||||||
|  | #  (http://www.tarsnap.com/man.html). | ||||||
|  | # ------------------------------------------------------------------------------ | ||||||
|  | # Authors | ||||||
|  | # ------- | ||||||
|  | # | ||||||
|  | #  * Daniel Teunis <daniel@teunis.cc> | ||||||
|  | # | ||||||
|  | 
 | ||||||
|  | _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 | ||||||
|  | } | ||||||
		Loading…
	
		Reference in New Issue