From c5c5fe7f37fb766c51da92ddc11027c2844b81e9 Mon Sep 17 00:00:00 2001 From: Daniel Teunis Date: Tue, 28 Jul 2015 21:56:48 +0200 Subject: [PATCH 1/2] Add tarsnap completion --- src/_tarsnap | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 src/_tarsnap diff --git a/src/_tarsnap b/src/_tarsnap new file mode 100644 index 0000000..2760c0d --- /dev/null +++ b/src/_tarsnap @@ -0,0 +1,35 @@ +#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 +} \ No newline at end of file From e11bd776bb627733dfdb417256a657c561f44d47 Mon Sep 17 00:00:00 2001 From: Daniel Teunis Date: Tue, 28 Jul 2015 21:59:04 +0200 Subject: [PATCH 2/2] Add newline at eof --- src/_tarsnap | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/_tarsnap b/src/_tarsnap index 2760c0d..efcc2c9 100644 --- a/src/_tarsnap +++ b/src/_tarsnap @@ -32,4 +32,4 @@ _tarsnap(){ fi return 0 -} \ No newline at end of file +}