about summary refs log tree commit diff
path: root/Completion/BSD/Command/_portsnap
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2007-07-20 16:39:13 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2007-07-20 16:39:13 +0000
commitae5af3a655c73445e4c13ac2b74fe5357815dda9 (patch)
tree968893ccda4d6748b2f0df88a735eb94700c3737 /Completion/BSD/Command/_portsnap
parent29729c14ad1edf73065d314f81157f3cff0b82e5 (diff)
downloadzsh-ae5af3a655c73445e4c13ac2b74fe5357815dda9.tar.gz
zsh-ae5af3a655c73445e4c13ac2b74fe5357815dda9.tar.xz
zsh-ae5af3a655c73445e4c13ac2b74fe5357815dda9.zip
Renato Botelho <rbgarga@gmail.com>: 23685: new FreeBSD completions
Diffstat (limited to 'Completion/BSD/Command/_portsnap')
-rw-r--r--Completion/BSD/Command/_portsnap26
1 files changed, 26 insertions, 0 deletions
diff --git a/Completion/BSD/Command/_portsnap b/Completion/BSD/Command/_portsnap
new file mode 100644
index 000000000..0e79e1f64
--- /dev/null
+++ b/Completion/BSD/Command/_portsnap
@@ -0,0 +1,26 @@
+#compdef portsnap
+
+flags=(
+  '(cron)fetch[Fetch a compressed snapshot or update existing one]'
+  '(fetch)cron[Sleep rand(3600) seconds, and then fetch updates]'
+  '(update)extract[Extract snapshot, replacing existing files and dirs]'
+  '(extract)update[Update ports tree to match current snapshot]'
+)
+
+_arguments -C -s \
+    '-d:Store working files in workdir:_files -/' \
+    '-f:Read configuration options from conffile:_files' \
+    '-I[Update INDEX only. (update command only)]' \
+    '-k:Trust an RSA key with SHA256 hash of KEY:_files' \
+    '-l:Merge the specified local describes file into the INDEX:_files' \
+    '-p:Location of uncompressed ports tree:_files -/' \
+    '-s:Server from which to fetch updates:_hosts' \
+    '*:principal:->principal' && ret=0
+
+if [[ $state = principal ]]; then
+  _alternative \
+    ':file flag:_values -S " " -w "commands" $flags[@]' \
+    '*:path:_files -/'
+fi
+
+return ret