about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorPaul Ackersviller <packersv@users.sourceforge.net>2007-11-19 03:21:33 +0000
committerPaul Ackersviller <packersv@users.sourceforge.net>2007-11-19 03:21:33 +0000
commit1911b35dd44a60dcc0bc91ad3682a6ee16ebfe08 (patch)
tree93d68e4b51bc747d2bc81f8fe8e277eec5101313 /Completion
parent411efa92f55b022d56b54a4ad30a8728682084e8 (diff)
downloadzsh-1911b35dd44a60dcc0bc91ad3682a6ee16ebfe08.tar.gz
zsh-1911b35dd44a60dcc0bc91ad3682a6ee16ebfe08.tar.xz
zsh-1911b35dd44a60dcc0bc91ad3682a6ee16ebfe08.zip
23654: Merge new completion onto the 4.2 branch.
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Debian/Command/_reprepro70
1 files changed, 70 insertions, 0 deletions
diff --git a/Completion/Debian/Command/_reprepro b/Completion/Debian/Command/_reprepro
new file mode 100644
index 000000000..44ed1548c
--- /dev/null
+++ b/Completion/Debian/Command/_reprepro
@@ -0,0 +1,70 @@
+#compdef reprepro
+
+local context state line distfile
+typeset -A opt_args
+local -a codenames
+
+_arguments \
+  '(-h --help)'{-h,--help}'[display help]' \
+  '*'{-v,-V,--verbose}'[be more verbose]' \
+  '--silent[be less verbose]' \
+  '(-b --basedir)'{-b,--basedir}':basedir:_files -/' \
+  '--confdir:config dir:_files -/' \
+  '--distdir:dist dir:_files -/' \
+  '--logdir:log dir:_files -/' \
+  '--overridedir:override dir:_files -/' \
+  '--dbdir:db dir:_files -/' \
+  '--listdir:list dir:_files -/' \
+  '--methoddir:method dir:_files -/' \
+  '(-C --component)'{-C,--component}':component:(component1 component2)' \
+  '(-A --architecture)'{-A,--architecture}':architecture:(amd64 sparc)' \
+  '(-T --type)'{-T,--type}':file type:(dsc deb udeb)' \
+  '(-S --section)'{-S,--section}':section:(section1 section2)' \
+  '(-P --priority)'{-P,--priority}':priority:(high low)' \
+  '--export=:whether and how:(never changed normal force)' \
+  '--ignore=:error type:(what otherwhat)' \
+  '--nolistsdownload[do not download Release or index files]' \
+  '--keepunreferencedfiles[do not delete files that are no longer used]' \
+  '--keepunneededlists' \
+  '--keepdirectories' \
+  '--ask-passphrase' \
+  '--noskipold' \
+  '--waitforlock:count:' \
+  '--spacecheck:behavior:(full none)' \
+  '--dbsafetymargin:bytes count:' \
+  '--safetymargin:bytes count:' \
+  '--noguessgpgtty' \
+  ':reprepro command:(export createsymlinks list listfilter remove update
+    iteratedupdate checkupdate predelete pull checkpull includedeb
+    includeudeb includedsc include processincoming check checkpool
+    rereference dumpreferences dumpunreferenced deleteunreferenced
+    reoverride dumptracks retrack removealltracks removetrack tidytracks
+    copy clearvanished gensnapshot rerunnotifiers)' \
+  '*::subcmd:->subcmd' && return 0
+
+case "$state" in
+    (subcmd)
+
+  case "$words[1]" in
+      (export|update|iteratedupdate|checkupdate|predelete|pull|checkpull|check)
+        if [[ -n "$opt_args[--confdir]" ]]; then
+	  distfile=${opt_args[--confdir]}/distributions
+	elif [[ -n "$opt_args[-b]" ]]; then
+	  distfile=${opt_args[-b]}/conf/distributions
+	elif [[ -n "$opt_args[--basedir]" ]]; then
+	  distfile=${opt_args[--basedir]}/conf/distributions
+	elif [[ -n "$REPREPRO_BASE_DIR" ]]; then
+	  distfile=${REPREPRO_BASE_DIR}/conf/distributions
+	else
+	  distfile=$PWD/conf/distributions
+	fi
+
+        codenames=($(awk '/^[Cc][Oo][Dd][Ee][Nn][Aa][Mm][Ee]: / {$1="";print}' "$distfile"))
+      	_wanted -V 'codenames' expl 'codename' compadd -a codenames
+	;;
+      (*)
+    	_files
+    	;;
+  esac
+  ;;
+esac